I try to bind the result of HttpService to an ArrayCollection. Here is
the code:
[Bindable]
public var myList:ArrayCollection;
<mx:HTTPService id="simpleHTS"
url="list.xml"
result="myList = new ArrayCollection(simpleHTS.lastResult.list.name)" />
<mx:ComboBox id="NameSelect"
dataProvider="{myList}"
labelField="user_name"
change="filterByName()"/>
The list.xml file is made up of :
<list>
<name>
<user_id>1</user_id>
<user_name>Test 1</user_name>
</name>
<name>
<user_id>2</user_id>
<user_name>Test 2</user_name>
</name>
</list>
If there are more than one record in the list.xml, it works fine. But
if there is just one record in the list.xml, I got this:
cannot convert mx.utils::[EMAIL PROTECTED] to
mx.collections.ArrayCollection.
Have any idea?
--
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/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
<*> 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/