Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

xytor

macrumors newbie
Original poster
Apr 16, 2011
6
0
Does NSFoundation have a data structure like the std::map? NSMutableDictionary is close, but doesn't seem to have any way to check if a certain key is already inside.
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
That's excellent, but how come the documentation makes no mention of this function?
http://developer.apple.com/library/...ableDictionary_Class/Reference/Reference.html

Is there any documentation that lists ALL the functions?

Thanks.

Because Apple do not duplicate the documentation from superclasses in subclasses. The objectForKey: method (not function) is defined in NSDictionary which is NSMutableDictionaries superclass. So any NSDictionary method can be called on a NSMutableDictionary.
 

xytor

macrumors newbie
Original poster
Apr 16, 2011
6
0
Because Apple do not duplicate the documentation from superclasses in subclasses. The objectForKey: method (not function) is defined in NSDictionary which is NSMutableDictionaries superclass. So any NSDictionary method can be called on a NSMutableDictionary.

Ooh that's good. My bad. Thanks for the clarification! :)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.