View Full Version : LayoutRegion.clearPanels doesn't work in beta2

3 Nov 2006, 9:43 AM

clearPanels doesn't remove all the panels from the collection. This is b/c the 'each' method can't really be used for a remove operation. Eventually, i is greater than the actual # of items in the collection but less than len, so it continues to execute, but calls remove with a null.

Not sure if it worth trying make 'each' handle this situation or just make clearPanels do a loop that walks the collection backwards.

That is a really cool use of a smart iterator to avoid writing loops for every method that walks a collection!

3 Nov 2006, 12:18 PM
Whoops, that makes total sense. Quite retarded of me. It looked so easy.... :)