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: Douglas Davidson <email@hidden>
- Date: Mon, 28 Jan 2002 12:02:44 -0800
On Monday, January 28, 2002, at 10:21 AM, Chris Gehlker 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 a dictionary to be a property list, or part of a property
list, then the keys must be strings.
If you wish to have more precise control over the handling of keys, you
can use a CFDictionary, which has several sets of callbacks defining
different policies, and allows you to write your own if you wish.
Douglas Davidson