One way to do so:
private var dictionaty:Dictionary = new Dictionary();
private var button:Button = new Button();
protected function initializeComponent():void
{
this.button.addEventListener(FlexEvent.CREATION_COMPLETE, onCreationComplete);
this.dictionary[this.button] = false;
}
function onCreationComplete(event:Event):void
{
if (event.target == this.button)
{
dictionary[this.button] = true;
}
Working this way you can allways test, wether the component-creation has been
completed or not.
Best regards from Germany
--- In [email protected], "cwicky99" <[EMAIL PROTECTED]> wrote:
>
> I need to programmatically determine if a component has dispatched
> FlexEvent.CREATION_COMPLETE so that I know it has finished being
> created as well as all of it's children.
>
> I don't see a "creationCompleted" property, is there some other way to
> tell? I know I can listen for the event I am wondering if there is
> some other way to tell that it had already happened. So I can have
> logic similar:
>
> if ( comp.creationCompleted )
> {
> // do stuff to a child
> comp.fooView.fooButton.addEventListener(...);
> }
> else
> {
> comp.addEventListener(FlexEvent.CREATION_COMPLETE, handleCreation);
> }
>