Over 10 years of community discussion and knowledge are maintained here as a read-only archive. New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC
|
|
|
Show Posts
|
Pages: 1 2 [3] 4 5 ... 17
|
33
|
Announcements and General Discussion / Fabrication / Re: Not working with Flex 4 SDK
|
on: July 31, 2009, 09:24:00
|
I'm sadden to say this, but I think Darshan has abandon Fabrication (and perhaps PMVC in general). I haven't seen him around in months and there's been no activity on his blog either Anyone want to pick-up the torch and continue the work to upgrade fabrication to work with Flex 4?
|
|
|
34
|
Announcements and General Discussion / Getting Started / Re: VO's and Binding in an Actionscript only project
|
on: July 29, 2009, 08:19:41
|
Another problem I have with the best practices example are the way the VO's are instantiated in the view components. To me, this doesn't make sense and makes the views less portable.
Shouldn't knowledge of the VO's ONLY be held by proxys, commands and mediators?
I would suggest instead adding public getters to the view components for any properties the corresponding mediator wishes to grab and populating the VO's ONLY in or via the proxys.
This is how I use VO's as well. I don't like having my reusable components require additional files like VO Objects. I usually either have something (Mediator) set the VO values on the component or I have a generic parse function in the component that will take an object and test for the values it thinks it should have using Object.hasOwnProperty() and then extract the values and apply them
|
|
|
35
|
PureMVC Manifold / Standard Version / Re: Beginner's Questions
|
on: July 27, 2009, 04:29:58
|
In regards to Notifications I have one question: the getBody() method pulls the body parameter. Is that parameter pretty much just a placeholder to be able to pass any argument you want through a notification?
Yes, it is there to pass any information you need. You can also use the type parameter to pass any additional info. Just remember that body accepts any type (it's an object) where as the type parameter only accepts strings (makes it good for indentifers or descriminators). My second question is about the facade... In the PureMVC world, how would one go about setting/getting a 'global' variable? Before I was using a singleton class I found that stores and instantiates global objects but I feel like with the facade, this should no longer be necessary... any tips for accomplishing this the right way?
You can use a proxy, it can be called from any of the actors (commands, mediators and other proxy's).
|
|
|
36
|
Announcements and General Discussion / Architecture / Re: Real world PureMVC folder structure
|
on: July 27, 2009, 04:19:16
|
The only things I put under the view/components are components that are directly related to the mediators and not likely to ever be reused (because they were created for a very specific purpose). I use a completely seperate hierarchyfor my reusable components like containers and controls, similar to the Flex framework hierarchy. Only my PMVC app files go under the traditional model/view/controller folders.
|
|
|
39
|
Announcements and General Discussion / Fabrication / Re: respondTo fails but handleNotification works
|
on: July 24, 2009, 06:18:24
|
Check that you are extending the proper Mediator, FlexMediator.
Try debugging the introspection method to see if something is going wrong there. It is in the FabricationMediator, listNotificationInterests() method. My guess it is something in there that is not properly introspecting since you do get the notifications, they just aren't being transfered to the named methods.
|
|
|
42
|
Announcements and General Discussion / Getting Started / Re: how does removeMediator works?
|
on: July 23, 2009, 08:00:16
|
Remove the mediator first, then in the mediators onRemove() function remove the view component.
example
override public function onRemove():void { viewComponent.parent.removeChild(viewComponent); // OR send a note to the parent objects mediator to remove sendNotification(REMOVE_CHILD, viewComponent); }
You can also remove any relevant event listeners there as well.
|
|
|
45
|
Announcements and General Discussion / Fabrication / Re: routeNotification
|
on: July 14, 2009, 09:52:29
|
There isn't enough info to say exactly what is wrong but here are a few things to keep in mind. - You cannot listen for routeNotification within the same module that sent it. Routes only go to other modules
- Check that you are sending to the appropriate module in the "to" field or that you are sending to *
- Double check that you have the correct naming convention for a respondTo method. Your example of receiveMessage would become respondToReceiveMessage
- Check that you have properly assigned a defaultRouter to all your modules.
- Make sure your mediator is extending the Fabrication appropriate mediator and not the PMVC one.
|
|
|
|
|
|