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  PureMVC Manifold / Demos and Utils / Re: Deployment Config - A PureMVC AS3 / Flex / AIR Utility on: May 20, 2010, 01:20:17
Hi Cliff,

Regarding your suggestion...

"Do this in your StartupCommand:
   
:
var configProxy:MyAppConfigProxy = new MyAppConfigProxy();
facade.registerProxy( configProxy );
configProxy.fetchConfig();

Register a command for ConfigProxy.SUCCESS which continues with the loading of the modules (the locations of which you'll probably define in this configuration file)."

...I was wondering what the best way to handle the fact that the command registered for ConfigProxy.SUCCESS does NOT have a reference to the mx:Application in the notification body (as the StartupCommand DOES).

I need this reference to the mx:Application to register my Mediators.

Currently I am simply keeping a track of it in the Facade...

:
var wFacade:ApplicationFacade = facade as ApplicationFacade;
wFacade.app = note.getBody() as QuestWaver;

var configProxy:WaverConfigProxy = new WaverConfigProxy("config/waver-config.xml");
facade.registerProxy(configProxy);
configProxy.retrieveConfig();

...and then retrieving it in the ViewPrepCommand.

Is there a better (more correct) way to do this?

Thanks,
Niel.

Pages: [1]