سؤال

أحاول إضافة كائن قائمة إلى المسرح ديناميكيًا ، لكنني دائمًا ما أحصل على خطأ عندما يتم استدعاء سطر معين:

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

خطأ في وقت التشغيل:

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

أي شخص لديه أي أفكار كيفية إصلاح هذا؟ شكرا لمساعدتك.

هل كانت مفيدة؟

المحلول

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top