Re: The joys of people using valueForKey to get objects out of a dictionary.
Re: The joys of people using valueForKey to get objects out of a dictionary.
- Subject: Re: The joys of people using valueForKey to get objects out of a dictionary.
- From: Jens Alfke <email@hidden>
- Date: Tue, 10 Nov 2015 09:03:11 -0800
> On Nov 10, 2015, at 8:32 AM, Alex Zavatone <email@hidden> wrote:
>
> Looking for reasons why I can explain "yeah, I know it works, but here's why it's a terrible idea to use to access a dictionary's objects".
I don’t know any reason why it would be bad, although I don’t typically use it.
On a related note, -setValue:forKey: can be useful because it _doesn’t_ raise an exception if the value is nil; instead it removes the key. Very convenient.
—Jens
_______________________________________________
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