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

Pages: [1]
Print
Author Topic: "Error: multitonKey for this Notifier not yet initialized!" problem. HELP!!  (Read 3482 times)
bestbuyernc
Full Member
***
Posts: 21


View Profile Email
« 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 ));
}
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #1 on: August 20, 2009, 03:56:04 »

Hard to tell whats going on from this code. Where is the error occuring? Are you using Flex Builder and the built in debugger? Can you breakpoint somewhere before the error occurs and step through the code?

Are you sure you're calling getInstance with a string?
-=Cliff>
Logged
Pages: [1]
Print