# Can't addChild combobox - parameter child must be non-null

**URL:** <https://forum.kirupa.com/t/cant-addchild-combobox-parameter-child-must-be-non-null/332611>\
**Category:** flash\
**Created:** [August 19, 2014, 12:47pm UTC](https://forum.kirupa.com/t/cant-addchild-combobox-parameter-child-must-be-non-null/332611 "2014-08-19T12:47:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![newtome](https://avatars.discourse-cdn.com/v4/letter/n/c4cdca/32.png) [@newtome](https://forum.kirupa.com/u/newtome)\
**Post date:** [August 19, 2014, 12:47pm UTC](https://forum.kirupa.com/t/cant-addchild-combobox-parameter-child-must-be-non-null/332611/1 "2014-08-19T12:47:13Z")

</div>

Been trying lots of combinations but can’t seem to crack it - hoping you guys can help. This is the code:

```auto
var _combobox_cb:ComboBox = new ComboBox();
_combobox_cb.addItem({data:1,label:"TestItem01"});
addChild(_combobox_cb);

```

which results in:

TypeError: Error #2007: Parameter child must be non-null.  
at flash.display::DisplayObjectContainer/addChildAt()  
at fl.controls::BaseButton/drawBackground()  
at fl.controls::BaseButton/draw()  
at fl.core::UIComponent/drawNow()  
at fl.controls::ComboBox/drawLayout()  
at fl.controls::ComboBox/draw()  
at fl.core::UIComponent/callLaterDispatcher()  
TypeError: Error #2007: Parameter child must be non-null.  
at flash.display::DisplayObjectContainer/addChildAt()  
at fl.controls::BaseButton/drawBackground()  
at fl.controls::BaseButton/draw()  
at fl.core::UIComponent/callLaterDispatcher()

---

<div class="post-metadata">

**Author:** ![TheTechnoViking](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/thetechnoviking/32/7374_2.png) [@TheTechnoViking](https://forum.kirupa.com/u/TheTechnoViking)\
**Post date:** [September 17, 2015, 6:14pm UTC](https://forum.kirupa.com/t/cant-addchild-combobox-parameter-child-must-be-non-null/332611/2 "2015-09-17T18:14:18Z")

</div>

I’m having the same issue. have you found a solution?

---

<div class="post-metadata">

**Author:** ![senocular](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/senocular/32/7217_2.png) [@senocular](https://forum.kirupa.com/u/senocular)\
**Post date:** [September 17, 2015, 8:34pm UTC](https://forum.kirupa.com/t/cant-addchild-combobox-parameter-child-must-be-non-null/332611/3 "2015-09-17T20:34:42Z")

</div>

You will need to make sure you have the ComboBox component in your library.
