Well, by not adding the children in createChildren, you're not working with the standard lifecycle so the documentation isn't going to be as helpful
The List classes do this, though, and call validateClient on the children after adding them. Look at makeRowsAndColumns() in List.as
Flex SDK Developer
Adobe Systems Inc.
Hey thanks for your answer. It's always a pleasure to get helped by the ReAL TeAm
Shall i use createChildren in my case ? Or you were just noticing this ? createChildren is called just once at the initialization right ?
I tried this instead :
displayedItems.addItem(UIComponent(child)); UIComponentGlobals.layoutManager.validateClient(UIComponent(child), true); invalidateDisplayList(); return UIComponent(child);
But it doesn't look like it helps... Have you more recommendations for what i'm trying to do ? (please see my previous post http://forums.adobe.com/thread/447375?tstart=30 )
override public function addChild(child:DisplayObject):DisplayObject
Sorry, i had already try this one. It doent work neither ...
hmm, why do you need to override addChild? It seems redundant to me. Are you expecting to gain something out of it? I really don't see what exactly..
Because what i want is the new child to be added to the current row of my multiline HBox (which is a VBox with multiple Hbox into it).
So i'm adding the pending child to this array, so the next time updatedisplaylist is called i can calculate if it has room on the last row or if i need to add a new row. So far the solution that i found is to add it directly to the row, so that it's already completely initialize the next time updatediaplylist in executed.
ok, I see now, but what about container resize? your solution leads directly to static one-time rendering, and if it will work as you expected it to work your container will not be responsive to external resizing. Is that what you want? since addChild method called once upon container initialization.
ok good luck then