I swear I tried that earlier.  Thanks for the bump to revisit this solution
worked perfectly.  J

 

Paul

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Fotis Chatzinikos
Sent: Thursday, 6 November 2008 4:12 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: ArryCollection Columns.

 

hello Paul, try the following:

for (var key:String in object)
{
    data = object[key] ;
}

where object is your arraycollection item ie ac[0]

On Thu, Nov 6, 2008 at 10:49 PM, Paul Kukiel <[EMAIL PROTECTED]> wrote:

I have been using describeType for VO's but for a simple query it isn't
working.

 

I'd really rather a generic solution where I don't have to do any tricks in
CF.  I'm sure I am just missing something.

 

Paul

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Jake Churchill
Sent: Thursday, 6 November 2008 3:38 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: ArryCollection Columns.

 

You might be able to use flash.utils.describeType() to get at the properties
of the AC if you don't know them.  Although, what I generally id convert the
query to a structure in which case you would be able to return an array or
structure key containing the columns.  

Paul Kukiel wrote: 

No.  It's a simple array collection.  Ie a ColdFusion query being passed
back to Flex.

 

Eg

                Select  firstName, lastName, age

                From person

 

So in flex it's

                Ac[0].firstName = Paul  ect

 

But I don't know ac[0].columName  so is there a way to loop over the
properties of the object at ac[0]?

 

Paul

 

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of valdhor
Sent: Thursday, 6 November 2008 3:25 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: ArryCollection Columns.

 

Are you working with multi-dimensional arrays or arrays of objects?

If the former, see the docs:

http://livedocs.adobe.com/flex/3/html/help.html?content=10_Lists_of_data_5.h
tml#119820

--- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> ,
"Paul Kukiel"  <mailto:[EMAIL PROTECTED]> <[EMAIL PROTECTED]> wrote:
>
> I wish to loop over an array collection and access all the elements
> (columns)
> 
> so the arrayCollection looks like
> 
> [1].columnOne
> [1].columnTwo
> [1].columnThree
> [2].columnOne
> [2].columnTwo
> [2].columnThree
> 
> I need to loop over the rows and columns, but don't know the column
names,
> any ideas. The array collection data is a query returned from
ColdFusion.
> 
> 
> 
> Paul.
>




-- 
Fotis Chatzinikos, Ph.D.
Founder,
Phinnovation
[EMAIL PROTECTED], 

 

Reply via email to