• 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: The joys of people using valueForKey to get objects out of a dictionary.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >The joys of people using valueForKey to get objects out of a dictionary. (From: Alex Zavatone <email@hidden>)

  • Prev by Date: Re: The joys of people using valueForKey to get objects out of a dictionary.
  • Next by Date: Re: The joys of people using valueForKey to get objects out of a dictionary.
  • Previous by thread: Re: The joys of people using valueForKey to get objects out of a dictionary.
  • Next by thread: Re: The joys of people using valueForKey to get objects out of a dictionary.
  • Index(es):
    • Date
    • Thread