Re: using NSMutableDictionary in place of NSDictionary
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