getitemAt will return an item object, not necessarily a string, depending on your data.

 

Perhaps you want

var oItem:Object = myCollection.getItemAt(0);

msg = oItem.myProperty;

 

Tracy


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of amalabie
Sent: Friday, September 01, 2006 9:32 AM
To: [email protected]
Subject: [flexcoders] Getting contents of ArrayCollection (flex newbie)

 

Hi! I have an ArrayCollection object returned from a RemoteObject call
and I need some help getting the data out of the collection.

What is the syntax to iterate through the collection and pick out the
data items I need.

<mx:ArrayCollection id="myCollection"
source="{remoteObject.get.lastResult}" />

In my actionScript, how do I access myCollection? I've tried
getItemAt() but am not sure whether I specified the right parms.

I've tried:
var msg:String;
msg = myCollection.getItemAt(0);

Nothing seems to work. I can see the ArrayCollection object in the
debugger and it contains the data I need, which is a mixture of
numbers and strings. Help!

Any pointers greatly appreciated! Thanks in anticipation!

__._,_.___

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





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to