Hi there,

For simple applications you can reference siblings by traversing the dispay list:  Application.application.A.aa.X.selectedIndex = 1;.  However, since you are using Cairngorm, you can maintain encapsulation by binding the state (selectedIndex) to the ModelLocator.  Jesse's going to have a pink kitten if he reads this. 

First, create a state variable in the ModelLocator:

public var AaaXselectedIndex : Number;

Then bind the variable to X.selectedIndex in aa:

<TabNavigator id="X" selectedIndex="{ModelLocator.getInstance().AaaXselectedIndex}">

To change X.selectedIndex just set the ModelLocator variable, from a command (preferable) or ab's script:

ModelLocator.getInstance().AaaXselectedIndex = 1;

Because X.selectedIndex is bound to the ModelLocator state variable the selectedIndex will be automatically updated and the view will reflect the change.

-TH


--- In [email protected], "flxcoder" <[EMAIL PROTECTED]> wrote:
>
> I have a heirarchy of classes in my viewstate A.
>
> A has child aa, ab and ac. aa, ab and ac are siblings, think about
> them as being 3 canvases under A.
>
> aa has tabNavigator X
>
> ab received data and wants to set aa.X.selectedIndex = 1 or something.
>
> How can I get reference to the id X since X is a child of aa.
>
> Is this making sense, please let me know and I will give a better
> example :)
>
> Thanks.
>

__._,_.___

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





YAHOO! GROUPS LINKS




__,_._,___

Reply via email to