Re: new to cocoa
Re: new to cocoa
- Subject: Re: new to cocoa
- From: Kyle Sluder <email@hidden>
- Date: Sun, 16 May 2010 18:08:17 -0700
On Sun, May 16, 2010 at 5:19 PM, William Squires <email@hidden> wrote:
> I believe keys in an NSDictionary/NSMutableDictionary are NSStrings; they're
> just descriptive tags you attach (or associate) with an object (the
> "value"). What you need is
Any object can be a key in an NSDictionary, but NSDictionary always
copies its keys. Its toll--free bridged companion, CFDictionary, can
be configured to just retain/release the keys instead.
> [sourceButtonMap setObject:[NSString stringWithString:@"no"]
> forKey:[unitButton description]];
This is a bad idea. Who knows what -description returns? Using a
textual description of an object intended for debugging in place of
the actual object is needlessly complex and just plain wrong.
--Kyle Sluder
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden