Try setting creationPolicy=”all” on your viewstack.  This will ensure that the child components have been created.  FYI… You do not want to use this approach too often, especially on deeply nested components.  It can drastically increase the initialization time of your applications.

 

It might be a better approach to bind the textinput text value to the datagrid’s selected item …

 

<mx:TextInput id=”input” text=”{list.selectedItem.someValue}” />

 

 

_____________________________________

Andrew Trice

Cynergy Systems, Inc.

http://www.cynergysystems.com

 

Blog: http://www.cynergysystems.com/blogs/page/andrewtrice

Email: [EMAIL PROTECTED]

Office: 866-CYNERGY 

 


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Daniel
Sent: Tuesday, October 17, 2006 11:41 AM
To: [email protected]
Subject: [flexcoders] LinkBar ViewStack Problem

 

Hello all!

I've been having this particular problem, I have 2 canvas inside a
viewStack, lest say something like:

<mx:ViewStack id="viewStack" width="100%" height="100%">
<mx:Canvas id="list" label="List">
<mx:DataGrid doubleClickEnabled="true"
doubleClick="viewStack.selectedIndex = 1;
input.text="list.selectedItem.someValue">
</mx:DataGrid>
</mx:Canvas>
<mx:Canvas id="form" label="Form">
<mx:TextInput id="input"/>
</mx:Canvas>
</mx:ViewStack>

Its simple, but whenever I double-click on the DataGrid, Flex gives an
error saying that it can't access a null object (referring to the
textinput "input" that is defined inside the second Canvas and is hidden).

I've noticed that when one uses viewstacks or accordions and wants to
access to an object inside a container that is hidden to initialize
it, there is no way to access it.

I've tried selecting the canvas first and then assinging the data,
like I did in the code above, but doesn't work either.

I really need help with this, otherwise Im gonna have to change the
layout of the hall application.

Thanks in advance!

__._,_.___

--
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