is it a wrong thing or a bad practice to remove a mediator or de-register it from within itself?
Nope. In fact that's the easiest way to deal with the mediators of transient view objects. Have the mediator listen to the view object for an event sent when it is removed. In the handler for that event just have the mediator remove itself. Also, there (or in the mediator's onRemove method), null the mediator's reference to the view component for good measure with a setViewComponent(null).
-=Cliff>
Hi Cliff,
Thanks for the response. I was kinda hesitant in doing since it seemed so much like suicide. :-)
Anyways, regarding de-registration of PureMVC actors, is it really necessary to de-register proxies, mediators, commands when removing a core? Or does removing the core do all this automagically?
Are there any anti-patterns in general regarding the removal or de-registration of core actors? Something like "would it be wrong if the facade was removed when the control is in the mediator" or "Never de-register any actor from a Proxy" etc.?
TIA,
sasuke