It's not just suggesting you change the text= part, it's suggesting you bind it to an ArrayCollection instead of an Array.  One of the others here could probably tell you more about the guts of how it works, but the bottom line is you either need to change your Array to an ArrayCollection, or add a second variable that is an ArrayCollection that wraps it.  It's pretty easy.  Just look at the ArrayCollection help.

On 6/29/06, Douglas Knudsen <[EMAIL PROTECTED]> wrote:

Ok, I have this array of objects called say addressesAry. Each
element is of type Address having the usual variables in it. I have a
form that has a List control with id="addressChoice" where the
dataProvider="{ adressesAry }" and labelField="addressTitle" lets say.
Next to this list control are TextInput controls for city, state,
address1, etc. I have it bound like so

<mx:TextInput width="240" id="city"
text="{addressesAry[addressChoice.selectedIndex].city}"/>

Now this works, but I get a compiler warning
"Data binding will not be able to detect changes when using square
bracket operator. For Array, please use ArrayCollection.getItemAt()
instead."

So, based on the warning suggestion I change things to this
<mx:TextInput width="240" id="city"
text="{addressesAry.getItemAt(addressChoice.selectedIndex).city}"/>
and things do NOT work at all.

so, is the compiler warning wrong? Or am I missing something about
bindings/events and this code?

--
Douglas Knudsen
http://www.cubicleman.com
this is my signature, like it?




--
Jason __._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





YAHOO! GROUPS LINKS




__,_._,___

Reply via email to