Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought

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

* | |

  Show Posts
Pages: 1 2 [3] 4 5 ... 17
31  Announcements and General Discussion / General Discussion / Re: Q: Best practice, where to store constants? on: August 11, 2009, 06:03:07
I store all my constants in a seperate constants file with the exception of notifications sent by proxies, which are stored in the proxies themseleves.
32  Announcements and General Discussion / Architecture / Re: Keeping track of data associated with display objects on: August 11, 2009, 06:01:19
If you are using Flex you can use the PMVC Console
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.

37  Announcements and General Discussion / Fabrication / Re: respondTo fails but handleNotification works on: July 25, 2009, 05:58:25
No problem, glad you go tit solved.

For Module to Module communications, it should work the same as module to Shell. Just make sure you are either sending it to: '*' or to a specific module name. See http://code.google.com/p/fabrication/wiki/UsingModules for more info on sending to modules.
38  Announcements and General Discussion / Fabrication / Re: respondTo fails but handleNotification works on: July 24, 2009, 09:18:01
Sorry, I meant Flash Mediator. Make sure you don't have an override of listNotificationInterests in your mediator that isn't calling super(). It is wierd that that method isn't getting called and explains why the introspection isn't happening.

I use Fabrication 0.6 with Flash myself and it works perfectly fine.
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.
40  Announcements and General Discussion / Fabrication / Re: respondTo fails but handleNotification works on: July 23, 2009, 07:56:05
What value does CommonConstants.SHELL_TO_MODULE have? You must ensure your respondTo method uses the same text as CommonConstants.SHELL_TO_MODULE but with an uppercase first letter.

if SHELL_TO_MODULE == ShellToModule
then respondToShellToModule()
41  Announcements and General Discussion / Public Demos, Tools and Applications / Re: Move the Cheese: A non-Flex Actionscript example of a Multicore Application on: July 23, 2009, 10:47:36
Nice work! It's nice to see others using it for Flash/AS3 and not just Flex.
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.

override public function onRemove():void {
    // 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.
43  PureMVC Manifold / Standard Version / Re: PureMVC (single core) as3 project templates for FB 3, Textmate, Flashdevelop on: July 22, 2009, 06:27:37
Flash develop http://gurufaction.blogspot.com/2007/07/puremvc-project-template-for.html
44  Announcements and General Discussion / Architecture / Re: notifications problem on: July 17, 2009, 06:19:05
Your super call in all 3 mediators is passing "mediatorName" instead of the "NAME" constant. Try changing that and it should work.
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.
Pages: 1 2 [3] 4 5 ... 17