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 / removeCore( key ) and onRemove() on: April 16, 2009, 05:47:03
Hi,

I am working on an multimodular Flexapplication with PureMVC. Sometimes a PureMVC core must be removed.

In that case I expected that the onRemove() function will be called by the framework. In our case we want to close an open Popup if it is still open if the core removes. But nothing happens. So I have cheated the View.as and modified the removeCore( key ) function like that:

:
public static function removeView( key:String ):void
{
var view:View = getInstance( key ) as View;
if (view != null) {
for (var mediator:String in view.mediatorMap) {
view.removeMediator( mediator );
}
}

delete instanceMap[ key ];
}

In my opinion this is the unsurprisingly behavior. I would enjoy it if the framework behavior would be changed like that.

kind regards
Sven

Pages: [1]