• 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: What's the Real Story on Keys for NSDictionary
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What's the Real Story on Keys for NSDictionary


  • Subject: Re: What's the Real Story on Keys for NSDictionary
  • From: Brian Webster <email@hidden>
  • Date: Mon, 28 Jan 2002 15:38:41 -0600

On Monday, January 28, 2002, at 02:26 PM, cocoa-dev-
email@hidden wrote:

The docs say that any class that implements NSCopying can provide keys for
NSDictionary. Hillegass says the keys must be NSString. I've had bad luck
with anything that should work, like NSNumber. So are they docs just wrong
here?

If you wish to use the dictionary as part of a property list (e.g. when writing it to disk), all the keys must be strings, but otherwise anything that implements NSCopying and hashes correctly can be used.

--
Brian Webster
email@hidden
http://homepage.mac.com/bwebster


  • Prev by Date: Re: How viable is Cocoa development?
  • Next by Date: Re: Customize Login Manager?
  • Previous by thread: Re: What's the Real Story on Keys for NSDictionary
  • Next by thread: Springs and struts with splitview
  • Index(es):
    • Date
    • Thread