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