Re: NSMutableDictionary setObject:forKey:
Re: NSMutableDictionary setObject:forKey:
- Subject: Re: NSMutableDictionary setObject:forKey:
- From: "Theodore H. Smith" <email@hidden>
- Date: Sun, 12 Jun 2005 12:14:18 +0100
Umm, I think all this is in the documentation -- see, for example,
<http://developer.apple.com/documentation/Cocoa/Conceptual/
Collections/Concepts/Dictionaries.html>
Yes, and also in the class docs for NSDictionary and
NSMutableDictionary. The OP had apparently looked at the docs (he
quoted from them) and was still missing something, so I thought maybe
it would help to spell things out in a slightly different way.
For example, I couldn't imagine what "it didn't work" meant in
reference to -objectForKey:
The app just crashed. And yes, I was testing the keys with NSStrings
and NSObjects. The values I know they can be any object. That would
be obvious.
until I read your previous post. That's
why I emphasized that dictionaries contain *pairs*, and only contain
as many key-value pairs as you put into them. In case that had
eluded Theodore for some reason.
Well, no. I know how dictionaries work. I've even written my own in
C, which is actually not bad for a dictionary, although not as fast
as Apple's it does offer many more features that are simply not
possible with a hash based dictionary.
--
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