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: "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