Removed from stage handler called unexpectedly

Problem

You have a handler attached to the removedFromStage event on your component and this handler is being called unexpectedly. Sometimes called during component initialization and sometimes during resizing.

Solution

The removedFromStage event is dispatched when a component is removed from another component which is on the Stage. This can occur in Flex due to an implementation detail in the Container class. The Container class is the parent class for Canvas, VBox, HBox and Tile. In certain instances, the Container class will decide that it needs to move all of its children into a special child called the contentPane. When this re-parenting operation is performed, the Event.REMOVED_FROM_STAGE event will be dispatched to the child components.

More information about this process can be found in the Flex 3 Anatomy page on Container in the sub-section explaining the contentPane property.

this is a solution?

The solution seems to be a more detailed explanation of the problem.

Submitted by Anonymous on Wed, 04/29/2009 - 16:35.

Search Great Flex/Flash Sites