Re: MutableDictionary setValue:forKeyPath - strange behavior
Re: MutableDictionary setValue:forKeyPath - strange behavior
- Subject: Re: MutableDictionary setValue:forKeyPath - strange behavior
- From: Steve Cronin <email@hidden>
- Date: Sun, 20 Sep 2009 14:42:51 -0500
Kyle;
In order to answer your request, I've gone back through the code that
generates myBaseSettings
essentially it is:
NSMutableDictionary *localDict = [NSMutableDictionary
dictionaryWithCapacity:70];
[localDict setObject:[self generateInterestingValue1]
forKey:@"interestingKey"];
…
…
[self setMyBaseSettings:localDict];
where setMyBaseSettings is an old-school KVC setter method
- (void) ssetMyBaseSettings:(NSMutableDictionary *) newSettings {
if (myBaseSettings!= newSettings) {
[myBaseSettings release];
myBaseSettings = [newSettings retain];
}
}
Does this provide you the information you are looking for?
Steve
On Sep 20, 2009, at 1:51 PM, Kyle Sluder wrote:
On Sep 20, 2009, at 11:35 AM, Steve Cronin <email@hidden>
wrote:
I have an instance variable which is an NSMutableDictionary *
myBaseSettings
You need to post the code that creates this dictionary.
--Kyle Sluder
_______________________________________________
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