Re: What's the Real Story on Keys for NSDictionary
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