I've got an interesting issue which I'm sure real programmers understand 
but I don't know quite how to describe.

Essentially, I've got a flex component that contains, among other 
things, an XMLList component with some data in it.

I have assigned that as the data provider for a tree item, and I've 
enabled drag and drop so I can drag items from one tree to the other.

I also have a "reset" button that I want to restore the source tree to 
its original state.

So on my TitleWindow (the main component) I have

creationComplete="treeDataInitial=treeData;"

And my reset button does this:

private function resetFieldLists():void
{
        treeData = treeDataInit;
        treeSelectedFields.dataProvider = [];
}

Unfortunately, treeDataInit seems to be linked to treeData, because it 
always contains the same content as treeData

How to I avoid this?  How do I make a copy of an object in Flex 2 so 
that it creates an entirely new object, not just a refernce to the 
original object?

Rick


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


Reply via email to