You have to make sure the dataProvideris an Array.  So assigning model1 directly won’t work unless you’re sure that model1 is an array.  Maybe there’s a sub property of model1 that is the array (and similarly for model2)?

 

Matt

 


From: Tom Fitzpatrick [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 16, 2005 12:59 PM
To: [email protected]
Subject: [flexcoders] Dataprovider change syntax

 

How do I dynamically change dataProviders for a comboBox in actionscript?

I have <mx:comboBox id="combo">, <mx:Model id="model1">, and <mx:Model
id="model2">.

In an AS function, the following didn't work:

combo.dataProvider = model1;

What is the correct syntax?

- Tom






Reply via email to