Using Alert.show(ObjectUtil.toString(e.result)) This is what I got:

(mx.collections::ArrayCollection)#0
  filterFunction = (null)
  length = 1
  list = (mx.collections::ArrayList)#1
    length = 1
    source = (Array)#2
      [0] (Object)#3
        DEPARTMENT = "PRMC"
        FIRSTNAME = "Wally"
        ISACTIVE = 1
        LASTNAME = "Kolcz"
        PASSWORD = "2113"
        POSITION = "Senior ColdFusion Architect"
        ROLE = "admin"
        UNIQNAME = "wkolcz"
    uid = "C7A50498-377F-0EE0-A170-18E1C0C2D677"
  sort = (null)
  source = (Array)#2

How can I set it to userData:ArrayCollection and then call the firstName 
variable?

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



Reply via email to