Re: [flexcoders] Re: Copying an Object

2008-04-24 Thread Peter Connolly
As an additional note, when using ObjectUtil.copy() with your own
user-defined classes (i.e., not Object, ObjectProxy,...), you may have
to use [RemoteClass] metadata or the registerClassAlias() method.

The problem is that "...when an object is deserialized from AMF, it
does not automatically get created as a class instance. The object
might have all of the properties of a class instance, but it will not
be a true class instance unless the AMF packet includes type
information about the object.  The type information gets added to AMF
in one of two ways:
- Using the {RemoteClass] metadata tag.
- Using the registerClassAlias() method.
..."

I found this out the hard way.

pc


[flexcoders] Re: Copying an Object

2008-04-24 Thread Lisa Lee
Awesome!  That seems to be exactly what I was looking for.  Thanks 
Peter - you rock!  :-)

--- In flexcoders@yahoogroups.com, "Peter Connolly" <[EMAIL PROTECTED]> 
wrote:
>
> Take a look at the copy() method in ObjectUtil:
> 
> http://livedocs.adobe.com/flex/2/langref/mx/utils/ObjectUtil.html#copy
()
>