• 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: NSDictionary objectForKey and non-standard key classes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSDictionary objectForKey and non-standard key classes


  • Subject: Re: NSDictionary objectForKey and non-standard key classes
  • From: email@hidden
  • Date: Tue, 28 Aug 2001 08:26:18 -0500

On Tuesday, August 28, 2001, at 08:00 AM, Bob Peterson wrote:

It is as if the key-equality function used by NSDictionary is "==", where keys are a match only if they are the same address. Or perhaps this is some fallout of the opaque hash functions alluded to in the docs but that I'm not supposed to worry about. What is my key class missing?

Try overriding '-(NSComparisonResult)compare:(id)value' as well. I recall noticing something like this once as well.

Brian

email@hidden http://personalpages.tds.net/~brian_hill

"Why? I came into this game for adventure - go anywhere, travel
light, get in, get out, wherever there's trouble, a man alone.
Now they've got the whole country sectioned off and you can't
move without a form. I'm the last of a breed."
-- Archibald "Harry" Tuttle, Rogue HVAC Repairman


  • Follow-Ups:
    • Re: NSDictionary objectForKey and non-standard key classes
      • From: Bob Peterson <email@hidden>
References: 
 >NSDictionary objectForKey and non-standard key classes (From: Bob Peterson <email@hidden>)

  • Prev by Date: NSDictionary objectForKey and non-standard key classes
  • Next by Date: Re: Dynamic Services?
  • Previous by thread: NSDictionary objectForKey and non-standard key classes
  • Next by thread: Re: NSDictionary objectForKey and non-standard key classes
  • Index(es):
    • Date
    • Thread