On Aug 19, 2009, at 6:19 PM, Seth Willits wrote:
On Aug 19, 2009, at 4:28 PM, Gideon King wrote:So do I need to override hash too? If so, are there any recommendations as to how to determine the hash easily?I probably shouldn't admit this, but I've yet to override hash and have yet to notice any problems. The docs say I should, so I realize I likely should, but I would really like a concrete reason to do so. I've never called hash, nor seen it ever called by anyone else's code. I assume the frameworks call it from somewhere, but where?
NSDictionary, NSSet, NSHashTable, NSMapTable, and possibly other classes all use hash. So if you ever put your objects in an NSSet or use them as dictionary keys, -hash should be called at some point.
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com