Re: mutable deep copying?
Re: mutable deep copying?
- Subject: Re: mutable deep copying?
- From: Daryn <email@hidden>
- Date: Sun, 28 Jul 2002 14:55:22 -0500
Unless I'm confused, this suggestion would yield a deep copy with only
the top-level dictionary being mutable. I want a mutable copy of the
entire data structure. Ie. all the child objects of the dictionary
should be mutable too.
I'm storing a mutable data structure into user defaults, and now I want
to make the retrieved data structure fully mutable again. Perhaps I've
overlooked some defaults method for doing this?
On Sunday, July 28, 2002, at 02:46 PM, Andrew Pinski wrote:
What about doing `id temp = [myDict copy]; need = [temp mutableCopy];
[temp release];temp=null;'?
Thanks,
Andrew Pinski
On Sunday, July 28, 2002, at 03:35 , Daryn wrote:
It seems that [myDict copy] results in a deep copy, while [myDict
mutableCopy] results in a shallow, yet mutable, copy. What I need is
a mutable deep copy of the dictionary.
My data structure is composed of simple dictionaries, arrays, and
strings. Is there a simple method by which I may obtain a mutable
copy of the entire data structure? Or do I need to implement my own
protocol to do this?
Daryn
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.