All of the documentation I have read states that this event is fired after the last render event of a Flex component. In my tests, it fires after the initial commit, measure, and updateDisplayLists are fired, which Flex calls automatically after the component is added by it's parent. If I make calls to additional methods like invalidateDisplay() or invalidateSize(), the event is not fired after these. If according to the documentation it is supposed to fire after the last render event, why is it firing before?
This behavior makes it really difficult to get the component's correct size.
I don’t see any mention of render. It only fires the first time a component gets through its validation methods after construction.
To me, it implies that creationComplete will fire only after all render events have finished. It seems to fire instead right after the Flex initially calls the commit, measure, and updateDisplayList methods, not after my code makes calls to additional invalidate methods. Am I interpreting it wrong?
When a component is first instantiated, it usually is already invalidated or will be because you set some properties on it. The framework will then try to validate it by calling the methods mentioned in the doc. Sometimes those methods get called more than once because, for example, the validation of the display list causes a second invalidation of the measurements. Eventually, the component finishes up an updateDisplayList call without invalidating anything else, and both creationComplete and updateComplete are fired.
Once that happens, if you invalidate the component again, you will only receive updateComplete events because, the creation has been completed earlier.