• 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
hash problem with NSString
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

hash problem with NSString


  • Subject: hash problem with NSString
  • From: Eric Ocean <email@hidden>
  • Date: Mon, 27 Sep 2004 12:17:12 -0700

For the string "Root" (and possibly others), NSConstantString returns 2292070089 for the hash value, and NSCFString returns 2608111400 for the hash value. I'm using the NSCFString in an NSDictionary (as a key), and a lookup using the NSConstantString return nil (i.e. it fails). Obviously,-isEqual: returns YES when you compare the two strings.

What can I do to fix this? I need to be able to lookup keys in the dictionary (for obvious reasons).

Regards,

Eric Ocean

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Interface Builder's text archive format
  • Next by Date: sort descriptors [Java]
  • Previous by thread: Interface Builder's text archive format
  • Next by thread: Re: hash problem with NSString
  • Index(es):
    • Date
    • Thread