• 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: "Gary L. Wade" <email@hidden>
  • Date: Tue, 10 Nov 2015 13:43:49 -0800

Lots of stuff with that. An immutable dictionary can't be changed. Someone doesn't know how to spell unknown (NSUnknosnKeyException). And not sure if that period is part of the key username or just good English, but if given as part of the key, it becomes a key path with an empty key. Anyway, this is a programmer error, not an API issue.
--
Gary L. Wade (Sent from my iPhone)
http://www.garywade.com/

> On Nov 10, 2015, at 1:32 PM, Alex Zavatone <email@hidden> wrote:
>
> And you guys have no idea how useful this discussion was to me today.
>
> Even though the KVO valueForKey: method doesn't crater with an NSUnknownException with ease, it turns out that this wonderful code is also using the KVO method of setValue: forKey: on a dictionary.
>
> And guess what?
>
> *** Terminating app due to uncaught exception 'NSUnknosnKeyException', reason, [<__NSDictionaryI.... setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key username.'
> *** First throw call stack:
>
>
> THANK YOU.
>

_______________________________________________

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: 
 >Re: The joys of people using valueForKey to get objects out of a dictionary. (From: Greg Weston <email@hidden>)
 >Re: The joys of people using valueForKey to get objects out of a dictionary. (From: Alex Zavatone <email@hidden>)
 >Re: The joys of people using valueForKey to get objects out of a dictionary. (From: Jens Alfke <email@hidden>)
 >Re: The joys of people using valueForKey to get objects out of a dictionary. (From: Alex Zavatone <email@hidden>)
 >Re: 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: Storing files into the Documents folder
  • 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