getChildByName only checks the immediate children.  Recursion is
required to go deeper.

 

If you can blow the stack be recursing on the display object tree, you
have too many things on the display list.

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of pbrendanc
Sent: Tuesday, July 01, 2008 8:37 PM
To: [email protected]
Subject: [flexcoders] Enumerating throug container/control arrays in
Flex/Actionscript?

 

In windows apps there is a control array collection that can be used
to find controls and return a handle to the appropriate object. 

What is the recommended Flex approach to finding controls and are
there any performance tradeoffs here - recursion is slow and
potentially error prone (stack overflows anyone?)??

(I'm seeing the use of recursive GetChildByName calls in some examples
and wonder if there is a more direct way to find a control given the
name/ID - regardless of the nesting level). Am I correct in thinking
that GetChildByName only searches the current node for an item, rather
than subordinate, nested items?

TIA,
Patrick

 

Reply via email to