ComboBox balks at me.

47 views
Skip to first unread message

Peder

unread,
Feb 8, 2011, 1:29:52 PM2/8/11
to MinimalComps
Hi, I'm using MinimalComps and RobotLegs together. I'm able to
populate a List component quite easily, but when I try to do the same
with the ComboBox I get:

Exception fault: TypeError: Error #1009: Cannot access a property or
method of a null object reference.
at com.bit101.components::ComboBox
.....

All I'm doing is adding an array, which List is quite happy to accept.

comboBox.items = myModel.list;

Even though myModel.list is not null, ComboBox is unhappy. This is
probably not providing enough information, but although it's a long
shot... any ideas would be helpful.

Thanks,

PJ

Keith Peters

unread,
Feb 8, 2011, 1:40:01 PM2/8/11
to minima...@googlegroups.com
well, hard to tell what's going on. Something is null. What is myModel.list? Should be an array. What is in it? What kind of objects with what properties? The exact same list works on the List component but not ComboBox? That seems tough to understand because ComboBox.set items just defers to List.set items:

public function set items(value:Array):void
{
_list.items = value;
--
---| Keith Peters

Peder

unread,
Feb 8, 2011, 2:06:54 PM2/8/11
to MinimalComps


On Feb 8, 1:40 pm, Keith Peters <k...@bit-101.com> wrote:
> well, hard to tell what's going on. Something is null. What is myModel.list?

> ComboBox? That seems tough to understand because ComboBox.set items just
> defers to List.set items:

Yes, that is my point. The exact same array of objects that I pass to
the List are not working for the ComboBox.

I'll continue experimenting and get back to you if the problem
persists. Thanks for the speedy reply though! :)

Peder

Keith Peters

unread,
Feb 8, 2011, 2:10:19 PM2/8/11
to minima...@googlegroups.com
Yeah, i'm still able to create an array and pass it to a combo box, no problem. so i'd like to see what's in your array.

Peder

unread,
Feb 8, 2011, 2:16:24 PM2/8/11
to MinimalComps
It could be a problem with the way I'm wiring up RobotLegs, so I'm
just coding a standalone minimal example by manually constructing an
array of the same objects and passing it to the ComboBox. Will let you
know what happens.

Peder :)

Peder

unread,
Feb 9, 2011, 12:08:01 AM2/9/11
to MinimalComps
Hi Keith, I just wanted to let you know that i got this worked out. I
rewrote the exact same code, but renamed my classes. i think the
Flash VM was perhaps just confused.

Peder

Keith Peters

unread,
Feb 9, 2011, 12:09:29 AM2/9/11
to minima...@googlegroups.com
Cool. Amazing how many times just rewriting the same code fixes things.
Reply all
Reply to author
Forward
0 new messages