NSMutableDictionary setObject:forKey:
NSMutableDictionary setObject:forKey:
- Subject: NSMutableDictionary setObject:forKey:
- From: "Theodore H. Smith" <email@hidden>
- Date: Sun, 12 Jun 2005 00:05:09 +0100
setObject:forKey: What kind of objects can the keys be?
The docs say this: "- (id)objectForKey:(id)aKey. Returns an entry’s
value given its key, or nil if no value is associated with aKey."
OK. But I tested this with [NSObject alloc]init] as the key, and it
didn't work.
Also, I tested this with two different NSMutableStrings (which I made
sure did not point to the same data, because I created them piece by
piece), where the strings were the same data, and the dictionary only
contained one key/value.
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.
--
http://elfdata.com/plugin/ Industrial strength string processing,
made easy.
"All things are logical. Putting free-will in the slot for premises in
a logical system, makes all of life both understandable, and free."
_______________________________________________
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