• 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: Core Data: Custom to-many relationship setter not being invoked
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core Data: Custom to-many relationship setter not being invoked


  • Subject: Re: Core Data: Custom to-many relationship setter not being invoked
  • From: Kyle Sluder <email@hidden>
  • Date: Tue, 23 Feb 2010 14:52:32 -0800

On Tue, Feb 23, 2010 at 2:32 PM, Jerry Krinock <email@hidden> 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 (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

  • Follow-Ups:
    • Re: Core Data: Custom to-many relationship setter not being invoked
      • From: Jerry Krinock <email@hidden>
References: 
 >Core Data: Custom to-many relationship setter not being invoked (From: Ken Tabb <email@hidden>)
 >Re: Core Data: Custom to-many relationship setter not being invoked (From: mmalc Crawford <email@hidden>)
 >Re: Core Data: Custom to-many relationship setter not being invoked (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Re: High Level Toolkit -- is it obsolete or not?
  • Next by Date: Re: iPhone app to Flash over wifi
  • Previous by thread: Re: Core Data: Custom to-many relationship setter not being invoked
  • Next by thread: Re: Core Data: Custom to-many relationship setter not being invoked
  • Index(es):
    • Date
    • Thread