• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSMutableDictionary setObject:forKey:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSMutableDictionary setObject:forKey:
      • From: Andy Lee <email@hidden>
    • Re: NSMutableDictionary setObject:forKey:
      • From: mmalcolm crawford <email@hidden>
  • Prev by Date: Re: NSSavePanel: Hide extension is killing the extension
  • Next by Date: Re: IBOutlet & NSTabView
  • Previous by thread: Re: Base-64 decode (was Property List Editor)
  • Next by thread: Re: NSMutableDictionary setObject:forKey:
  • Index(es):
    • Date
    • Thread