I have a hierarchie of containers like:
Panel
 -HBox
 -HDivideBox
        --Box
        --Canvas
               ---VBox
               ---HDivideBox
                    ----Box1 
                    ----Box2 <----Probleme
               ---VDivideBox
                    ----Box3
                    ----Box4

and when I try to programmatically add a Child at Box 2.
Application.application.Box2.addChild(CustomComponent);
 I have this error message: 

---------------------------------------------------------------------

RangeError: Error #2006: The supplied index is out of bounds.
        at flash.display::DisplayObjectContainer/getChildAt()
        at mx.core::Container/getChildAt()
[C:\dev\flex_201_gmc\sdk\frameworks\mx\core\Container.as:2369]
        at mx.containers.utilityClasses::BoxLayout/measure()
[C:\dev\flex_201_gmc\sdk\frameworks\mx\containers\utilityClasses\BoxLa
yout.as:88]
        at mx.containers::Box/mx.containers:Box::measure()
[C:\dev\flex_201_gmc\sdk\frameworks\mx\containers\Box.as:250]
        at mx.core::UIComponent/mx.core:UIComponent::measureSizes()
[C:\dev\flex_201_gmc\sdk\frameworks\mx\core\UIComponent.as:5448]
        at mx.core::UIComponent/validateSize()
[C:\dev\flex_201_gmc\sdk\frameworks\mx\core\UIComponent.as:5394]
        at mx.core::Container/validateSize()
[C:\dev\flex_201_gmc\sdk\frameworks\mx\core\Container.as:2688]
        at 
mx.managers::LayoutManager/mx.managers:LayoutManager::validateSize()
[C:\dev\flex_201_gmc\sdk\frameworks\mx\managers\LayoutManager.as:557]
        at 
mx.managers::LayoutManager/mx.managers:LayoutManager::doPhasedInstanti
ation()
[C:\dev\flex_201_gmc\sdk\frameworks\mx\managers\LayoutManager.as:646]
        at Function/http://adobe.com/AS3/2006/builtin::apply()
        at 
mx.core::UIComponent/mx.core:UIComponent::callLaterDispatcher2()
[C:\dev\flex_201_gmc\sdk\frameworks\mx\core\UIComponent.as:7909]
        at 
mx.core::UIComponent/mx.core:UIComponent::callLaterDispatcher()
[C:\dev\flex_201_gmc\sdk\frameworks\mx\core\UIComponent.as:7852]

----------------------------------------------------------------------

If someone knows the probleme ..?
It's a Flex Bug or there is a solution ..?
Thanks 

Thierry

Reply via email to