• 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: using NSMutableDictionary in place of NSDictionary
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: using NSMutableDictionary in place of NSDictionary


  • Subject: Re: using NSMutableDictionary in place of NSDictionary
  • From: James Dempsey <email@hidden>
  • Date: Fri, 24 Feb 2006 17:58:15 -0800


On Feb 24, 2006, at 11:36 AM, Steve Sheets wrote:

Almost always, when working with persistent, non-static dictionaries (ie. ones that the program changes), we convert the NSDictionary into an NSMutableDictionary. Sometimes the dictionary contains sub-dictionaries, and we walk the tree, converting them as we go.

Rather than walking the tree yourself, you can deserialize your dictionary with NSPropertyListSerialization, and use the NSPropertyListMutableContainers option to have all arrays and dictionaries in the property list created as mutable versions from the get go.


http://developer.apple.com/documentation/Cocoa/Reference/Foundation/ ObjC_classic/Classes/NSPropertyListSerialztion_index.html

-James

--------------------------------------------------
James Dempsey
AppKit Engineering
Apple
email@hidden



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >using NSMutableDictionary in place of NSDictionary (From: Steve Sheets <email@hidden>)

  • Prev by Date: Re: Fill an NSView with a tile of NSImage
  • Next by Date: Re: How to hide system menu bar and the dock bar in cocoa?
  • Previous by thread: Re: using NSMutableDictionary in place of NSDictionary
  • Next by thread: Re: using NSMutableDictionary in place of NSDictionary
  • Index(es):
    • Date
    • Thread