On 2010 Feb 23, at 14:52, Kyle Sluder wrote: > 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."
Well, I said a KVC-compliant technique. Let's say "making the change in a KVC-compliant way". But, yes, it's moot... > 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. OK, I see it now. It's in the Key-Value Coding Programming Guide > Accessor Search Implementation Details > Accessor Search Pattern for Unordered Collections. The array controller is skipping Step 1 in the search path. So, I agree it's definitely a bug, either behavior or documentation. _______________________________________________ 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