Re: NSDictionary objectForKey and non-standard key classes
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