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 / MultiCore Version / Help!ApplicationFacade getInstance return null. on: August 07, 2009, 03:23:32
first i load a module , then i unload it ,
when i load it again , module's ApplicationFacade return a null instance.

i trace it in code, find that instanceMap[ key ] is not null,but cast it return null.

who can help me?

:
        public static function getInstance( key:String ) : ApplicationFacade
        {
        trace(key);
        trace("instanceMap[ key ]:");
        trace(( instanceMap[ key ] == null )?"nothing":instanceMap[ key ]);
       
            if ( instanceMap[ key ] == null ) instanceMap[ key ]  = new ApplicationFacade( key );
        trace("instanceMap[ key ]:");
        trace(( instanceMap[ key ] == null )?"nothing":instanceMap[ key ]);
        trace(instanceMap[ key ] as ApplicationFacade);
            return instanceMap[ key ] as ApplicationFacade;
        }

:
               
 moduleLoader.applicationDomain = ApplicationDomain.currentDomain;
Pages: [1]