yes, you can.
import mx.utils.ObjectUtil;
var myCopy:* = ObjectUtil.copy( originalObject );
then you got a copy of original object.
btw, if you check the source you will find it's done by ByteArray so internal structure are kept after copying.
Jeremy.
On 5/19/06, yomahz <[EMAIL PROTECTED]> wrote:
Is there a way to copy the object by value instead of reference upon
drag and drop? I'd like to make a copy of the object being dropped
into the new container so that changes made to it, do not effect the
original.
I tried implementing a handler on dragComplete as such:
public function handleSelectedItemsDragComplete(e:DragEvent):void {
Object(e.draggedItem).data = "">}
This doesn't seem to work and I'm not sure why. When I make updates to
DataGrid A, it still effects DataGrid B.
Is there a better way to accomplish this?
------------------------ Yahoo! Groups Sponsor --------------------~-->
Everything you need is oneclick away. Make Yahoo! your home pagenow.
http://us.click.yahoo.com/AHchtC/4FxNAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~->
--
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
SPONSORED LINKS
Web site design development | Computer software development | Software design and development |
Macromedia flex | Software development best practice |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.