On Tue, Feb 23, 2010 at 2:32 PM, Jerry Krinock <je...@ieee.org> wrote:
> Furthermore, I've never been able to find any documentation stating that 
> Cocoa is required to invoke the set mutator method(s).  Invoking the 
> setEmployees: method, which both Ken and I have noted *does* happen, is a 
> KVC-compliant technique.  So, I'm not sure that it's a bug.

Not quite. KVC compliance refers to implementing the proper methods
such that -setValue:forKey:, -valueForKey: and
-mutable(Set|Array)ValueForKey: work. It doesn't refer to how one
modifies that property. So it doesn't make sense to say that "calling
-setEmployees: is KVC-compliant." In fact, according to the Accessor
Search Implementation Details, you don't need to implement -set<Key>:
at all. It just so happens that Core Data gives you an implementation
that doesn't do what you need to do, and KVC uses it when convenient.

The real bug is that NSArrayController doesn't use the fast-path KVC
methods for updating the target of its contentSet binding, which is
what exposes the need to override -set<Key>: in this situation.

--Kyle Sluder
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to