7Jul/080
Flex: understanding the component instantiation life cycle
Could not agree more. It is tricky and confusing !!!
http://www.onflex.org/ted/2007/02/flex-instantiation-life-cycle-and-event.php
http://nwebb.co.uk/blog/?p=169
About the component instantiation life cycle
more:
http://www.wietseveenstra.nl/blog/2007/02/understanding-the-flex-application-startup-event-order/
Base on my understanding . Here is the process of adding the<mx:Box label="hi"/> to the parents container.
1) box object is created.
2) box.CONFIGURE process ( label is set)
3)box.PREINITIALIZE ( children of box has not been created )
4) ADD CHILD ( add box to canvas)
5) box. INITIALIZE( children is created but the layout is not sized yet)
6)box.CREATIONCOMPLETE
Things to remember
- configure process ( variable settings) occurs BEFORE preinitialize
- box.initialize occurs AFTER it is added to the parent