Setting creationPolicy to "all" is not generally recommended, because it
increases startup time.
 
In order to make your app work with Flex's deferred instantiation, you
should assume that components you can't see don't exist. When they
eventually get created, you can use handlers like 'initialize' or
'creationComplete' to set data into them.
 
- Gordon

________________________________

From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf Of Alex Harui
Sent: Thursday, February 22, 2007 7:45 PM
To: [email protected]
Subject: RE: [flexcomponents] TabNavigator child not created till the
tab button is clicked.



creationPolicy="all"

________________________________

From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf Of Firdosh Tangri
Sent: Thursday, February 22, 2007 7:27 PM
To: [email protected]
Subject: [flexcomponents] TabNavigator child not created till the tab
button is clicked.

hey all ,
             I have a TabNavigator component which has components loaded
in them both TextArea .

I noticed I kept getting a null object error when I tried to access the
second TextArea  component. so i tried to see if it was initialized 

    <mx:TextArea id="notes_Ta" 
                          width="100%" height="98%"
text="{_slides[0].notes}" 
                          creationComplete="onNotesLoaded(event);"/>



private function onNotesLoaded(evt:Event):void{
    
    trace("loaded" +notes_Ta);
}

the trace statement only gets initialized when I click on the Tab
button. So if I wanted to set the text the user would first have to
click on the 
Tab Button. 

Is there a way so that all the children are loaded when added to the
TabNavigator  component

thanks
cheers :)
firdosh.



 

Reply via email to