Re: NSUserDefaults and mutability
Re: NSUserDefaults and mutability
- Subject: Re: NSUserDefaults and mutability
- From: Trygve Inda <email@hidden>
- Date: Sun, 09 Mar 2008 10:58:00 +0000
- Thread-topic: NSUserDefaults and mutability
>
> On 8 Mar '08, at 1:57 PM, Trygve Inda wrote:
>
>> Is this expected? Can I rely on it? I will never need to change
>> dict, but I
>> am modifying items within a known sub Dictionary.
>
> Don't rely on this; it's entirely possible this behavior could change
> in the future, causing your app to throw an exception. Something much
> like that happened in 10.4 (I think) — maybe it was the mutability of
> collections read from property lists — and broke a bunch of apps.
>
> —Jens
Is it enough then to take the dictionary I get back and do a [dict
mutableCopy]?
Will this cascade down to the "subdicts" (dicts within the top level dict).
Thanks,
Trygve
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden