• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: mutable deep copying?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mutable deep copying?


  • Subject: Re: mutable deep copying?
  • From: Greg Titus <email@hidden>
  • Date: Sun, 28 Jul 2002 12:56:01 -0700

On Sunday, July 28, 2002, at 12:35 PM, 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?

There is no simple way to do this built into the Cocoa frameworks, but it isn't that difficult to implement it yourself.

Or, you can use ours. There is a -deepMutableCopy implementation for those classes in OmniFoundation.

Hope this helps,
-Greg
_______________________________________________
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.

  • Follow-Ups:
    • Re: mutable deep copying?
      • From: Ondra Cada <email@hidden>
References: 
 >mutable deep copying? (From: Daryn <email@hidden>)

  • Prev by Date: Re: Serial number verification / obfuscation
  • Next by Date: Re: mutable deep copying?
  • Previous by thread: Re: mutable deep copying?
  • Next by thread: Re: mutable deep copying?
  • Index(es):
    • Date
    • Thread