bestbuyernc
|
|
« on: August 14, 2009, 04:26:14 » |
|
Hello. For some reason i am getting the Error: multitonKey for this Notifier not yet initialized!" error even though I only call the facade from the onRegister() function in the Mediators and from the execute() functions of the Commands. I don't reference the facade at all in the onRegister functions of the proxies that I register on startup. I am using the StartupCommand from an example I found that extends the MacroCommand. All of this started happening after I tried to implement the StartupManager. I wanted to pull some values from the database to populate a combo box that the user can set when logging in. I didn't want the login view to be displayed if the combo box values are not populated. I thought this thought the error was caused by making changes while going through the StartupManager getting started tutorial, but I changed everything back and I am still getting the error. VERY FRUSTRATING!! It absolutely worked before. All of the posts I see on this topic say that it is because you have to get the facade.retrieve() from the onRegister() and I have done that. Is there something else I am missing? Thank you.
// Startup Command
public class StartupCommand extends MacroCommand { override protected function initializeMacroCommand():void { addSubCommand( ModelPrepCommand ); addSubCommand( ViewPrepCommand ); } }
// Model Prep Command
public class ModelPrepCommand extends SimpleCommand { override public function execute(note:INotification):void { facade.registerProxy( new ApplicationProxy() ); facade.registerProxy( new UserProxy() ); facade.registerProxy( new LoginProxy() ); facade.registerProxy( new RegistrationProxy() ); } } // View Prep Command
override public function execute( note:INotification ):void { var app:MYMVCAPP = note.getBody() as MYMVCAPP; facade.registerMediator( new ApplicationMediator( app )); }
|