[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: question regarding explicit exception in NSKeyValueCoding.m:429 -[NS
Re: question regarding explicit exception in NSKeyValueCoding.m:429 -[NSObject(KeyValueCoding) setValue:forUndefinedKey:]
Thu, 28 Jul 2011 22:38:33 -0700
On Jul 28, 2011, at 11:15 AM, Sebastian Reitenbach wrote:
> Well, besides you said silently discarding the missing key error is maybe not
> the right way, putting an exception handler around the _setValue() helped...
That the missing key is consumed is actually right in this particular case. And
yes, for the non-libFoundation variant, you would probably need to wrap it in
an exception handler to accomplish the desired behavior. The SOPE
WOKeyPathAssoc is(was?) highly optimized for libFoundation, I think the
Cocoa/GS branches default to the standard KVC (it'll be muuuuch slower, but
that might be perfectly fine on modern hardware ;-).