On 24/04/2009, at 6:44 PM, Jean-Daniel Dupas wrote:

NSMutableDictionary *newThing2 = [newThing mutableCopy];
[newThing2 setObject:foo forKey:bar];


This doesn't copy the contents of the dictionary, it only makes a mutable copy of the dictionary itself. If an object in the second dictionary is mutated, the same object in the first dictionary changes also. That is the OP's problem.

--Graham


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to