• 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: KVC Compliance Document: What if ivar in an NSSet?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: KVC Compliance Document: What if ivar in an NSSet?


  • Subject: Re: KVC Compliance Document: What if ivar in an NSSet?
  • From: mmalc crawford <email@hidden>
  • Date: Fri, 14 Dec 2007 13:39:01 -0800


On Dec 14, 2007, at 12:14 PM, Jerry Krinock wrote:

In the Key Value Programming Coding Guide > Ensuring KVC Compliance,
http://developer.apple.com/documentation/Cocoa/Conceptual/KeyValueCoding/Concepts/Compliant.html
It says:
"For to-many relationships, KVC compliance requires that...Your class implements a method named -<key> that returns an array..."
I would say that an NSSet ivar is a to-many relationship. Does this mean that my accessors must translate NSSet <-> NSArray, or am I reading the documentation too literally?


That document hasn't been updated to discuss sets. The pattern for sets is described at <http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Protocols/NSKeyValueCoding_Protocol/Reference/Reference.html#//apple_ref/occ/instm/NSObject/mutableSetValueForKey: >.

A common reason for having a relationship represented by a set is because you're using Core Data. If this the case, then the relevant accessor methods are fully described here <http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/Articles/cdAccessorMethods.html >

mmalc

_______________________________________________

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: KVC Compliance Document: What if ivar in an NSSet?
      • From: Jerry Krinock <email@hidden>
References: 
 >KVC Compliance Document: What if ivar in an NSSet? (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Re: Drag 'n Drop a filename in a table
  • Next by Date: Re: NSString componentsSeparatedByString returned memory
  • Previous by thread: KVC Compliance Document: What if ivar in an NSSet?
  • Next by thread: Re: KVC Compliance Document: What if ivar in an NSSet?
  • Index(es):
    • Date
    • Thread