문제

I'm trying to add a List object to the stage dynamically, but I always get an error when a certain line is called:

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

Error thrown at runtime:

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()

Anybody have any ideas how to fix this? Thanks for your help.

도움이 되었습니까?
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top