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]
1  Announcements and General Discussion / General Discussion / Re: Handling FlashVars in PureMVC on: August 14, 2008, 01:30:45
Ah ha! Of course! Clean and simple. Love it.

Thanks, Cliff.
2  Announcements and General Discussion / General Discussion / Re: Handling FlashVars in PureMVC on: August 14, 2008, 08:03:22
Great post. Thank you.

I too have been thinking about how best to handle flashvars and have a slightly different approach.

I treat flashvars as I would anything else that comes from my View; by dispatching a custom event and letting the mediator send a notification out to the rest of the application with the flashvars as payload.

My creationComplete handler looks like this:
:
private function creationCompleteHandler():void {
   ApplicationFacade.getInstance(NAME).startup(this);
   dispatchEvent(
      new CreationCompleteEvent(
         CreationCompleteEvent.COMPLETE,
         Application.application.parameters
      )
   );
}

Then inside the Application's Mediator I simply handle the CreationCompleteEvent and send a Notification which is processed by a InitFlashVars Command.

:
private function creationCompleteEventHandler(event:CreationCompleteEvent):void {
   sendNotification(ApplicationFacade.INIT_FLASHVARS, event.flashvars);
}

My original feeling was that I didn't want the Facade to do anything but... well, be a facade.

To be honest, I'm still trying to "think in PureMVC" and don't really know if one way is better than another. Thoughts?

-Phil
3  Announcements and General Discussion / General Discussion / Re: Unable to get instance of a facade in multicore on: August 05, 2008, 03:16:11
I've been having the same issue and have a fairly bare-bones example that may prove to be useful.

[EDIT] Upon further inspection, there were a few things going wrong in my example. I'll re-post when I have something legitimate. (That's what I get for posting after a long day at work  :-\)

-Phil
Pages: [1]