tag:robotlegs.tenderapp.com,2009-10-18:/discussions/problems/141-onremove-not-being-executed-in-my-mediatorRobotlegs: Discussion 2018-10-18T16:35:15Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/24840402010-08-05T18:36:40Z2010-08-05T18:38:34ZonRemove not being executed in my Mediator<div><p>That <em>is</em> weird! Does the view component, by any chance, end up back on stage just after being removed? The MediatorMap always waits one frame and checks <code>view.stage</code> is null before removing the mediator - this is to allow for "re-parenting".</p></div>Shaun Smithtag:robotlegs.tenderapp.com,2009-10-18:Comment/24840402010-08-13T15:39:49Z2010-11-09T10:39:06ZonRemove not being executed in my Mediator<div><p>I just ran into the same issue and found this thread via google. shaun mentioned the "conflict". thes elines of the CasaSprite should open your eyes:</p>
<pre><code> override public function get stage():Stage {
if (super.stage == null) {
try {
return StageReference.getStage();
} catch (e:Error) {}
}
return super.stage;
}</code></pre>
<p>If you set the static reference to the stage in the StageReference class, the mediatorMap will never get a null value from any class extending CasaSprite</p></div>ego