thanks.... describeType does the job perfectly :)

On 14 Mar 2006, at 02:15, Gordon Smith wrote:

In AS3, only dynamic properties show up in for-in loops, and there is no
'enumerable' attribute.

However, you can use the flash.util.describeType() method to discover
the public properties and methods of a non-dynamic class.

- Gordon


-----Original Message-----
From: [email protected] [mailto:[email protected]] On
Behalf Of Alisdair Mills
Sent: Monday, March 13, 2006 2:20 PM
To: [email protected]
Subject: [flexcoders] enumerable instance properties

Hi,

I am trying to use a for in loop to access instance properties in AS3 
but it isn't finding any.... so I have a value object

public class VO {
      public var foo : String ;
}

then if I pass an instance of this and try and access it's 
properties....

for ( var prop : String in myVO ) {
      trace ( prop + " = " + myVO[ prop ] ) ;
}

... it finds nothing. but if i do this...

trace ( myVO.foo ) ;

... it will output the value no problem.

Is there some way of marking instance properties as enumerable?

Thanks in advance for any help.... it is driving me nuts :(

cheers, Al


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








--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS







--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to