Skip to main content
Jhon Carlo
Inspiring
December 3, 2016
Answered

ComboBox Problem

  • December 3, 2016
  • 2 replies
  • 1214 views

I'm trying to add some item to a combo box but I get the error message below:

//My script:

MyCombo.addItem({ label: "MyItem1"});

MyCombo.addItem({ label: "MyItem2"});

Why?

Any hint?

Thank you.

//the error message:

TypeError: Error #1009: Cannot access a property or method of a null object reference.

  at fl.containers::BaseScrollPane/drawBackground()

  at fl.controls::List/draw()

  at fl.core::UIComponent/drawNow()

  at fl.controls::List/scrollToIndex()

  at fl.controls::SelectableList/scrollToSelected()

  at fl.controls::ComboBox/open()

  at fl.controls::ComboBox/onToggleListVisibility()

ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.

  at flash.display::DisplayObjectContainer/removeChild()

  at fl.controls::ComboBox/close()

  at fl.controls::ComboBox/onToggleListVisibility()

This topic has been closed for replies.
Correct answer kglad

that's an animate cc 2017 bug.

either use an earlier version of animate or create your own combobox.

2 replies

bls1999
Participant
January 22, 2019

Sorry for the bump, but did Adobe solve this?

Inspiring
February 27, 2019

Did you try it?

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
December 3, 2016

that's an animate cc 2017 bug.

either use an earlier version of animate or create your own combobox.

Jhon Carlo
Inspiring
December 3, 2016

Thank you kglad.

But I don't understand why adobe give this component if it doesn't work.

Why don't give a good one?

kglad
Community Expert
Community Expert
December 3, 2016

i don't have an answer for that.

my guess is something new in animate 2017 (like adding components to canvas) caused a problem that no one detected.  hopefully that will be fixed in the next update.