[flexcoders] Re: Traverse List of All Children

2007-11-06 Thread Jurgen Beck
Thanks, Adam. I should have added more details to my post. The 'complexity' is introduced by the fact that I am having to find all Validator components, which are not DisplayObjectContainers. Using Object (implemented by each validator subclass) in the recursive function does not work

[flexcoders] Re: Traverse List of All Children

2007-11-05 Thread aduston1976
Why does it get complex with nested sets of child components? Why can't you just use a recursive function? function doSomethingToAllDescendants(component : DisplayObjectContainer) : void { for (var i : int = 0; i component.numChildren; i++) {