• 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: Subclassing NSManagedObject
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Subclassing NSManagedObject


  • Subject: Re: Subclassing NSManagedObject
  • From: mmalcolm crawford <email@hidden>
  • Date: Sun, 22 May 2005 16:17:37 -0700


On May 22, 2005, at 3:01 PM, T Reaves wrote:

For my accessors & mutators, do I really need to go through all the steps as outlined in Apple's docs? If they are simple accessors & mutators, can I do
- (NSString *)name
{
return [self valueForKey:@"name"];
}


If these are managed attributes, then yes, you must follow the steps -- for the reasons outlined in the documentation...
If these are not persistent attributes then you can use the simple accessors, but then (assuming you want to integrate with bindings) you must enable automatic KVO notifications -- again as outlined in the documentation.


Note that Xcode can put suitable accessor methods on the pasteboard for you...

mmalc

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Subclassing NSManagedObject (From: T Reaves <email@hidden>)

  • Prev by Date: Re: What does "NS" means ?
  • Next by Date: Re: Subclassing NSManagedObject
  • Previous by thread: Re: Subclassing NSManagedObject
  • Next by thread: Re: Subclassing NSManagedObject
  • Index(es):
    • Date
    • Thread