Probably means that the CB's width is also NaN and got that way due to
some funky layout logic somewhere.

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Dominic Pazula
Sent: Friday, April 11, 2008 8:20 AM
To: [email protected]
Subject: [flexcoders] Error from ComboBox while drawing component...

 

I have a programatically defined ComboBox with a bound dataProvider. 
The dataProvider starts out as an empty ArrayCollection. A RPC 
returns values and populates the ArrayCollection on the bound 
object. 

In this case, there is 1 element in the ArrayCollection which is a 
string.

When the bound object is populated, I get this error:
ArgumentError: Error #2004: One of the parameters is invalid.
at flash.display::Graphics/drawRoundRect()
at mx.skins::ProgrammaticSkin/drawRoundRect()
[E:\dev\3.0.x\frameworks\projects\framework\src\mx\skins\ProgrammaticS
kin.as:745]
at mx.skins.halo::ButtonSkin/updateDisplayList()
[E:\dev\3.0.x\frameworks\projects\framework\src\mx\skins\halo\ButtonSk
in.as:217]
...

Debuging, I find that ProgrammaticSkin is trying to call: 
drawRoundRect(x=0,y=0,width=NaN,height=24,ellipseSize=8,ellipseSize=8)

Any ideas on what is going on here? 

For the record, my code defining the ComboBox and the binding is:
textSelect = new ComboBox();
textSelect.percentWidth = 50;
textSelect.dataProvider = param.possibleValues;
BindingUtils.bindProperty
(textSelect,"dataProvider",param,"possibleValues");
BindingUtils.bindProperty(param,"value",textSelect,"selectedItem");

paramJob = new SASGetPVJob(paramJob,null,param,null);
paramJob.run(); //Makes the RPC call to get possible values for the 
param

item.addChild(textSelect); //item is the FormItem
tForm.addChild(item); //tForm is the Form

 

Reply via email to