Re: NSMutableDictionary setObject:forKey:
Re: NSMutableDictionary setObject:forKey:
- Subject: Re: NSMutableDictionary setObject:forKey:
- From: Joe Osborn <email@hidden>
- Date: Sat, 11 Jun 2005 20:14:03 -0500
On Jun 11, 2005, at 20.09, Eric Brunstad wrote:
On Jun 11, 2005, at 9:05 PM, Eric Brunstad wrote:
On Jun 11, 2005, at 7:05 PM, Theodore H. Smith wrote:
This leads me to think that setObject can only use strings. But
then the docs don't say so. So I'm a bit confused here.
That is correct. The AppKit just has a habit of using id instead
of the actual class sometimes.
Wait! I was wrong. I thought you were asking about keys. The
value can be of any class but the key must be a string.
You are still wrong :). The key can be of any NSCopying-compliant
class. The value can be of any class. The docs are incorrect,
though; they should say that the key should be an (id<NSCopying>).
-Eric
_______________________________________________
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
_______________________________________________
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