Domanda

Sto cercando di aggiungere un oggetto List nello stage in modo dinamico, ma ho sempre un errore quando un certo linea si chiama:

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

Errore gettato in fase di esecuzione:

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

Qualcuno ha tutte le idee su come risolvere questo problema? Grazie per il vostro aiuto.

È stato utile?
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top