...which only works for Object.  Other "non-dynamic" classes cannot be
iterated in this way.  DescribeType and/or mx.utils.ObjectUtil can help.

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Ralf Bokelberg
Sent: Sunday, September 02, 2007 11:35 AM
To: [email protected]
Subject: Re: [flexcoders] retrieving object property names.



properties = new Array();
for( var property:String in object ) properties.push( property );

Cheers,
Ralf. 


On 9/2/07, yms0411 < [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > wrote:


        How do you retrieve object property names?
        
        for example, i create an object
        var obj:Object = new Object();
        obj["id"]=000;
        obj["phone"] = 0202020;
        obj["name"] = "john smith";
        .... and so on.
        
        How would i retrieve the property name of obj so that i would
get an 
        array holding these properties.
        i.e [id,phone,name,....]
        
        

        




-- 
Ralf Bokelberg <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> >
Flex & Flash Consultant based in Cologne/Germany
Phone +49 (0) 221 530 15 35 

 

Reply via email to