• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: MutableDictionary setValue:forKeyPath - strange behavior
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >MutableDictionary setValue:forKeyPath - strange behavior (From: Steve Cronin <email@hidden>)
 >Re: MutableDictionary setValue:forKeyPath - strange behavior (From: Kyle Sluder <email@hidden>)
 >Re: MutableDictionary setValue:forKeyPath - strange behavior (From: Steve Cronin <email@hidden>)
 >Re: MutableDictionary setValue:forKeyPath - strange behavior (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: bitmap caching issue (was: settings to build for 10.5 on 10.6?)
  • Next by Date: Re: favicon of address
  • Previous by thread: Re: MutableDictionary setValue:forKeyPath - strange behavior
  • Next by thread: favicon of address
  • Index(es):
    • Date
    • Thread