I am building my template application and wanting 3 xml files to be loaded before my application starts to do anything related to the project it will be implemented on.
I have in my ApplicationStartupCommand.as the following:
override protected function initializeMacroCommand() :void
{
trace("ApplicationStartupCommand().initializeMacroCommand()");
// I want a sequential command process here
// 1. Model prep
// 2. Embedded assets prep
// 3. View prep
// Model prep on success will call embedded assets prep
// Embedded assets prep will call view prep
// View prep will register application mediator
addSubCommand( ModelPrepCommand );
}
The proxy will load a local xml file, what I need is the command to listen for notifications (success or fail).
On success: addSubCommand( EmbeddedAssetsPrepCommand );
Which will just call a singleton of a embedded assets class and then add the final subCommand ( viewPrepCommand ), which in the puremvc template registers the application mediator.
Question 1:
How should a command listen for a notification if I can't use
override public function handleNotification( note:INotification ):void ?
Question 2:
Or should I just ignore the possibilities of failure at this stage of the puremvc and assume that the xml file will always be in existence? And just place all subCommands in the ApplicationStartupCommand?
Question 3:
If I were to have a large scale application with many many many events being listened for and reacted upon, would the ApplicationFacade still have hard coded in constants for each of these events?
Thanks
Darcey