On Apr 24, 2009, at 4:35 AM, Steve Cronin wrote:
Everything I do causes any change I make in newThing2 to also be made in newThing.

newThing2 = [NSMutableDictionary dictionaryWithCapacity:20];
[newThing2 setDictionary:newThing];
[newThing2 setObject:foo forKey:bar]; // at this method line [newThing objectForKey:bar] is now foo

This should work.  Are you sure you don't have a typo somewhere?

The symptoms you describe suggest that newThing == newThing2. What if you NSLog(@"%d", newThing == newThing2)? Maybe you're overreleasing newThing and newThing2 is using newThing's dealloc'ed memory?

Are you setting up bindings somewhere that might be replicating changes in newThing to newThing2?

--Andy

_______________________________________________

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