this index (@150ba0a1) e mx.rpc.events.ResultEvent (@1516eaa9) [inherited] headers null result mx.collections.ArrayCollection (@151f2701) [inherited] [0] mx.utils.ObjectProxy (@1516eee1) DEPARTMENT "PRMC" FIRSTNAME "Wally" ISACTIVE 1 LASTNAME "Kolcz" object Object (@15247ce1) PASSWORD "2113" POSITION "Senior ColdFusion Architect" ROLE "admin" type null uid "3D083FE4-4B87-A1E6-B185-18D99C4193BD" UNIQNAME "wkolcz" source Array (@1537ef21) [0] mx.utils.ObjectProxy (@1516eee1) length 1 statusCode 0 resultArrColl undefined firstResult undefined
---------------------------------------- From: Fotis Chatzinikos <fotis.chatzini...@gmail.com> Sent: Tuesday, January 27, 2009 7:42 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: Setting data from web service to ArrayCollection. Why do not you try Alert.show(ObjectUtil.toString(e.result)) //replace e.result with e to see the whole event ObjectUtil is very useful in situation like this as it show a textual representation of any object graph On Tue, Jan 27, 2009 at 5:37 PM, valdhor <valdhorli...@embarqmail.com> wrote: Perhaps you have an arrayCollection of arrayCollections (What does the debugger show as the result type?). You may like to try... var resultArrColl:ArrayCollection = e.result.source; var firstResult:ArrayCollection = resultArrColl[0]; Alert.show(firstResult[0]); --- In flexcoders@yahoogroups.com, "Wally Kolcz" <wko...@...> wrote: > > I moved my CFC and database to my localhost so I can debug the webservice output and see it. I am a wee bit confused. The results panel is saying something like this: > > e --> result --> source --> [0] --> firstName (etc) > > How do I set that local? > > I tried myData = e.result.source as ArrayCollection and then tried to trace myData.getItemAt(0).firstName but got an error. > > ---------------------------------------- > From: "Wally Kolcz" <wko...@...> > Sent: Tuesday, January 27, 2009 5:30 AM > To: flexcoders@yahoogroups.com > Subject: [flexcoders] Setting data from web service to ArrayCollection. > > I am so trying to wrap my head around web services and use them for my projects since we Blue Dragon here at the U. I have my CFCs and they seem to work fine. However, I have no idea on how to set the 'return value' for a web service to an arraycollection to use it. I am used to RemoteObjects that I can just set and then use myData.getItemAt(0).name... > > I have a query to my database that returns one row of records through a web service. It is returned to my Flex app and I am trying to get it to an ArrayCollection variable for use in the application. I was watching a Lynda video that uses something like: > > myData = e.result.Tables.Table0.Rows as ArrayCollection. Now is that how you can set that row's columns at the value of the ArrayCollections? Or is this only going to work for the video scenerio? > > Thanks for any info! > -- Fotis Chatzinikos, Ph.D. Founder, Phinnovation fotis.chatzini...@gmail.com,