因此,在Flex應用程序中,我通過創建它並調用parent.addChild()
來添加一個新的GUI組件。但是在某些情況下,這會導致Flex的腸道出現錯誤。原來,的addChild實際上沒有:addChild如何選擇錯誤的插入索引?
return addChildAt(child, numChildren);
在它打破了的情況下,莫名其妙的numChildren的是關閉的一個。導致此錯誤:
RangeError: Error #2006: The supplied index is out of bounds. at flash.display::DisplayObjectContainer/addChildAt() at mx.core::Container/addChildAt() at mx.core::Container/addChild() . . at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.core::UIComponent/dispatchEvent() at mx.controls::SWFLoader::contentLoaderInfo_completeEventHandler()
這是Flex中的一個錯誤還是我如何使用它?看起來它可能是一個線程錯誤,但由於Flex不支持有點令人困惑的線程。
你能重新設置錯誤一些換行符,它使後硬的其餘部分閱讀! – 2008-09-29 09:43:27