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?
------------------------ Yahoo! Groups Sponsor --------------------~-->
Check out the new improvements in Yahoo! Groups email.
http://us.click.yahoo.com/6pRQfA/fOaOAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~->
--
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
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/