Looks like you're going one level too deep in your source attribute for
your ArrayCollection. Also your XML example is malformed, you're closing
records before record but I'm guessing that's just a typo.

Jeff

-----Original Message-----
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of pdflibpilot
Sent: Tuesday, January 02, 2007 1:23 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] ArrayCollection does not yield the same results as
dataGrid


I am using an HTTPservice request to get a set of records in basic
format like so....

<records><record><mergeField>MyField</mergeField></records></record>

I am using the default result format for this request:

<mx:HTTPService id="annotationsInfoReq"
url="http://myDomain.com/getRecords.php"; useProxy="false"
method="POST"   ><mx:request xmlns=""></mx:request></mx:HTTPService>

I then have an ArrayCollection bound to the request:

<mx:ArrayCollection id="annotInfo" source=
"{ArrayUtil.toArray(annotationsInfoReq.lastResult.records.record)}" />

Whenever I try to reference a returned record using the following:

annotInfo.getItemAt(0).mergeField  I get the error 'mergeField' is
undefined.

However the counterpart reference via the dataGrid works fine:

annotDG.dataProvider.getItemAt(0).mergeField 

What am I missing here ? I have used AC before many times without any
problem



--
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