You probably meant to use "prompt" instead of "labelField"

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of timgerr
Sent: Thursday, July 17, 2008 1:07 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Problem with showing dynamic combobox

 

Hello all,
I an running into a problem, when I create a Actionscript ComboBox
like this:

[Bindable]
public var respArray: Array = [
{label:""},{label:"Yes"},{label:"No"},{label:"N/A"},{label:"No
Responce"}];

var cb1:ComboBox = new ComboBox();
cb1.id = 'cb1me';
cb1.dataProvider = respArray;
addChild(cb1);

All is displayed correctly

But when I add the labelField like this
var cb1:ComboBox = new ComboBox();
cb1.id = 'cb1me';
cb1.dataProvider = respArray;
cb1.labelField = 'Please Select';
addChild(cb1);

When this is displayed the ComboBox displays:
[Object Object]
[Object Object]
[Object Object]
[Object Object]

Why is the labelField messing up my array?

Thanks,
timgerr

 

Reply via email to