Be aware of deferred instantiation.  Only the children that have been
viewed by the user will be instantiated.

 

I am curious as to why you want to do this.  If you are declaring the
children ar design time, why not give them known Ids?  If you are
instantiating them at run-time, you should probably keep a reference to
each in some structure like an associative array.

 

Tracy

 

________________________________

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of lorenzo.boaro
Sent: Thursday, December 18, 2008 5:48 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Get Children function

 

Thanks Kenneth

--- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
, "Kenneth Sutherland"
<kenneth.sutherl...@...> wrote:
>
> Pretty much the same thing.
> 
> 
> 
> You should have something like the following
> 
> 
> 
> var myStack : CustomViewStack = new CustomeViewStack();
> 
> 
> 
> so myStack.getChildAt(0) will return the first child (providing it has
> at least one child).
> 
> Kenneth.
> 
> 
> 
> 
> 
> From: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
[mailto:flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
] On
> Behalf Of lorenzo.boaro
> Sent: 18 December 2008 09:43
> To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> 
> Subject: [flexcoders] Re: Get Children function
> 
> 
> 
> ok but to reach this from as3?
> 
> thanks
> 
> Lorenzo
> 
> --- In flexcoders@yahoogroups.com
<mailto:flexcoders%40yahoogroups.com>
<mailto:flexcoders%40yahoogroups.com>
> , "Kenneth Sutherland"
> <kenneth.sutherland@> wrote:
> >
> > Presuming you've given your custom viewstack an ID inside the custom
> > panel you'd call that then get the selectedChild or getChildAt for
> that
> > viewstack.
> > 
> > <CustomPanel>
> > 
> > <CustomViewStack id='myStack' >
> > 
> > <Panel id='panel1' />
> > 
> > <Panel id='panel2' />
> > 
> > </CustomViewStack>
> > 
> > </CustomPanel>
> > 
> > 
> > 
> > So to get panel1 you could do the following
> > 
> > myStack.getChildAt(0);
> > 
> > 
> > 
> > There are other ways such as getChildren() or getChildByName(). Just
> > check out the API docs on viewstack.
> > 
> > Kenneth
> > 
> > 
> > 
> > 
> > 
> > From: flexcoders@yahoogroups.com
<mailto:flexcoders%40yahoogroups.com>
<mailto:flexcoders%40yahoogroups.com>
> [mailto:flexcoders@yahoogroups.com
<mailto:flexcoders%40yahoogroups.com>
<mailto:flexcoders%40yahoogroups.com>
> ] On
> > Behalf Of lorenzo.boaro
> > Sent: 18 December 2008 09:14
> > To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
<mailto:flexcoders%40yahoogroups.com> 
> > Subject: [flexcoders] Get Children function
> > 
> > 
> > 
> > Hi, 
> > 
> > i've this problem...
> > 
> > i created a class that extends a Panel, named CustomPanel.
> > 
> > CustomPanel contains a CustomViewStack (that extends ViewStack)
> > 
> > and CustomViewStack contains 2 differents panel.
> > 
> > i would retrieve CustomViewStack children from CustomPanel.
> > 
> > How can i reach this?
> > 
> > thanks a lot 
> > 
> > Ragards
> > 
> > Lorenzo
> > 
> > 
> > 
> > Disclaimer 
> >
> ----------------------------------------------------------
> > This electronic message contains information which may be privileged
> and confidential. The information is intended to be for the use of the
> individual(s) or entity named above. If you are not the intended
> recipient, be aware that any disclosure, copying, distribution or use
> of the contents of this information is prohibited. If you have
> received this electronic message in error, please notify us by
> telephone on 0131 476 6000 and delete the material from your computer.

> > Registered in Scotland number: SC 172507. 
> > Registered office address: Quay House 142 Commercial Street
> Edinburgh EH6 6LB. 
> > 
> > This email message has been scanned for viruses by Mimecast.
> >
> ----------------------------------------------------------
> >
> 
> 
> 
> Disclaimer 
>
----------------------------------------------------------
> This electronic message contains information which may be privileged
and confidential. The information is intended to be for the use of the
individual(s) or entity named above. If you are not the intended
recipient, be aware that any disclosure, copying, distribution or use
of the contents of this information is prohibited. If you have
received this electronic message in error, please notify us by
telephone on 0131 476 6000 and delete the material from your computer. 
> Registered in Scotland number: SC 172507. 
> Registered office address: Quay House 142 Commercial Street
Edinburgh EH6 6LB. 
> 
> This email message has been scanned for viruses by Mimecast.
>
----------------------------------------------------------
>

 

Reply via email to