Hi Manish,

Thank you for your answer, here is a function which converts an Object to a ValueObject with the same variables, if anyone else find it useful:

public function objectToVO(object : Object) : void
{
            var describeType : XML = flash.util.describeType(this);
            var variables : XMLList = describeType.child("accessor");

            for each (var variable:XML in variables) {
                this[variable.attribute("name")] = object[variable.attribute("name")];
            }
}

I've done it because I'm using Flex and AMFPHP and I couldn't do it as object:ValueObject = ValueObject(Object), because I got a conversion error.

Oriol.

2006/4/9, Manish Jethani <[EMAIL PROTECTED]>:
> On 4/9/06, Oriol Gual < [EMAIL PROTECTED]> wrote:
>
> > Is there any way to retrieve all the variables names from a custom class?
>
> Flex 2.0?  describeType + E4X
>
> Manish
>
>
> --
> 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
>
> <*> To visit your group on the web, go to:
>     http://groups.yahoo.com/group/flexcoders/
>
> <*> To unsubscribe from this group, send an email to:
>     [EMAIL PROTECTED]
>
> <*> Your use of Yahoo! Groups is subject to:
>     http://docs.yahoo.com/info/terms/
>
>
>
>
>



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




Reply via email to