I have a command that I want to be executed at startup.

So in my <cairngorm:CairngormApplication> tag I set the initialize 
attribute : initialize="loadCatalog()"

My loadCatalog function is defined like this :

public function loadCatalog() : Void
{
   alert("TEST");
   EventBroadcaster.getInstance().broadcastEvent( "loadCatalog", null );
}

I also set a button that execute this same function :

<mx:Button click="loadCatalog()" label="test"/>

When the application starts up, the alert inside the loadCatalog() 
function is displayed but the "loadCatalog" command is not executed.

If I click on the button, the alert is displayed and the "loadCatalog" 
command is executed.

I have the impression that when initialize() calls loadCatalog(), the 
event system is not completely ready ...

Is it possible to execute a command at startup ? How should I do that ?


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to