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 18:01:06 -0500
Folks;
Thanks for all of the guidance! I have found the issue.
It turns out that [localDict copy] is what was being sent to the
setBaseSetting.
In dealing with the static analyzer's warnings I must have made this
change and then had failed to back it out…
MY BAD
Removed this and all is well again.
A tip of the hat to Kyle for immediately sending me in the right
direction.
Karl - darn fine point about the random nature of 'allKeys'
(this code has been working fine for months - but I will stop relying
on this 'side-effect')
Thank-you all
Steve
On Sep 20, 2009, at 5:01 PM, Kyle Sluder wrote:
On Sun, Sep 20, 2009 at 12:42 PM, Steve Cronin
<email@hidden> wrote:
essentially it is:
"Essentially" isn't good enough; actual copy-paste is necessary to
ensure you're doing it correctly.
NSMutableDictionary *localDict = [NSMutableDictionary
dictionaryWithCapacity:70];
This is good.
- (void) ssetMyBaseSettings:(NSMutableDictionary *) newSettings {
There's an extra "s" in here… does this mean you didn't actually
copy/paste the setter from your code? Or maybe you're using a
synthesized @property(copy) getter but a manually implemented setter,
and because you have typo'd the setter method, the compiler is
synthesizing one for you instead?
--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