• 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
Re: NSMutableDictionary setObject:forKey:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: NSMutableDictionary setObject:forKey:
      • From: Andy Lee <email@hidden>
    • Re: NSMutableDictionary setObject:forKey:
      • From: mmalcolm crawford <email@hidden>
References: 
 >NSMutableDictionary setObject:forKey: (From: "Theodore H. Smith" <email@hidden>)
 >Re: NSMutableDictionary setObject:forKey: (From: Eric Brunstad <email@hidden>)

  • Prev by Date: Re: NSMutableDictionary setObject:forKey:
  • Next by Date: Re: NSMutableDictionary setObject:forKey:
  • Previous by thread: Re: NSMutableDictionary setObject:forKey:
  • Next by thread: Re: NSMutableDictionary setObject:forKey:
  • Index(es):
    • Date
    • Thread