0

Flex 3 why does the update complete event come 2 times. It is the best event for me to recognize if the component is ready to be used. Variables set, bindings, everything... But it comes twice, I wonder if that is always the case and why.

Thanks, Dave

4

1 に答える 1

1

FlexEvent.UPDATE_COMPLETE is dispatched on every update of the display list. It is dispatched after every invalidation - after user interaction or change in the components on the current display list. Use FlexEvent.CREATION_COMPLETE instead. It is dispatched only once (initiated by the LayoutManager), just after the component has been initialized and added to the display list.

There are many articles about the Flex component lifecycle (e.g. this), where you can find more information about the invalidation mechanisms and the events dispatched.

于 2012-09-17T16:52:43.217 に答える