The behavior you're seeing is the Deferred Instantiation feature of Flex. The point of it is to avoid creating components until the user can see them, in order to minimize the application startup time.

 

Setting creationPolicy="all" 'fixes' the problem by disabling this feature. It is almost never the right thing to do, as it causes your app to start up more slowly. You should instead write your app in a way that works with Deferred Instantiation.

 

Instead of trying to push data into a TextInput before it exists, store the data in a var and then have teh TextInput "pull" the data into itself in its 'initialize' handler, which is guarantee to execute when the TextInput gets created.

 

- Gordon

 


From: [email protected] [mailto:[email protected]] On Behalf Of Matt Horn
Sent: Thursday, September 14, 2006 7:15 AM
To: [email protected]
Subject: RE: [flexcoders] what's going on with this Flex?!?

 

if that is the issue, you could set the container's creationPolicy to
all. Check out the chapter on improving startup performance in the
Building and Deploying book for more info.

hth,

matt horn
flex docs

> -----Original Message-----
> From: [EMAIL PROTECTED]ups.com
> [mailto:[EMAIL PROTECTED]ups.com] On Behalf Of arnold_charming
> Sent: Thursday, September 14, 2006 5:00 AM
> To: [EMAIL PROTECTED]ups.com
> Subject: [flexcoders] what's going on with this Flex?!?
>
> Hi!
>
> I have some tabs in my flex application and when I want to
> access a text field on my last tab I get an error about null
> reference. If I click on this tab and try again then it
> works. I guess the error happens because the last tab isn't
> yet loaded. So please explain to me how can I solve this and
> how can someone build a sirious business application if there
> are such strange errors?
>
>
>
>
>

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to