AS3列表问题

问题描述:

我想要一个List对象添加到动态阶段,但我总是当某一行被称为一个错误:AS3列表问题

TypeError: Error #2007: Parameter child must be non-null. 
at flash.display::DisplayObjectContainer/addChildAt() 
at fl.controls::BaseButton/fl.controls:BaseButton::drawBackground() 
at fl.controls::LabelButton/fl.controls:LabelButton::draw() 
at fl.core::UIComponent/drawNow() 
at fl.controls::List/fl.controls:List::drawList() 
at fl.controls::List/fl.controls:List::draw() 
at fl.core::UIComponent/fl.core:UIComponent::callLaterDispatcher() 
TypeError: Error #2007: Parameter child must be non-null. 
at flash.display::DisplayObjectContainer/addChildAt() 
at fl.controls::BaseButton/fl.controls:BaseButton::drawBackground() 
at fl.controls::LabelButton/fl.controls:LabelButton::draw() 
at fl.core::UIComponent/fl.core:UIComponent::callLaterDispatcher() 
:在运行时抛出

input.addItem({label:"test",data:"test"}); 

错误

任何人有任何想法如何解决这个问题?谢谢你的帮助。

+0

还是坏了...有人有想法吗? – Cyclone 2010-02-18 03:11:36

+0

这是第一个添加到列表中的项目吗? – Amarghosh 2010-02-18 04:31:19

+0

你能展示更多的代码吗? – bhups 2010-02-18 07:28:32