• 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: Tue, 6 Jun 2006 23:08:41 -0700


On Jun 6, 2006, at 9:20 PM, David Alter wrote:

To debug I have added the method "- (id)initWithEntity: (NSEntityDescription *)entity insertIntoManagedObjectContext: (NSManagedObjectContext *)context" to my subclass of NSManagedObject. I know this is not recommended but I wanted to make sure my class was getting created.

In addition to "Can you provide a sample of your getters and setters?" did you invoke the superclass's method correctly?

It is initializing my subclass but none of my set methods are being called. I'm not clear on how my objects should be initialized with the data from disk. I assumed that it would use set methods and key value coding to set the data.

No, it doesn't (doing so would emit change notifications):
<http://developer.apple.com/documentation/Cocoa/Reference/ CoreDataFramework/Classes/NSManagedObject_Class/Reference/ Reference.html#//apple_ref/occ/instm/NSManagedObject/ setPrimitiveValue:forKey:>


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: David Alter <email@hidden>)

  • Prev by Date: RE: Color Picker implementation error
  • Next by Date: Re: Custom IB palette: Is there a way to use parent's IB inspector and also add new features to it?
  • Previous by thread: Re: Subclassing NSManagedObject
  • Next by thread: Editing State in NSOutlineView
  • Index(es):
    • Date
    • Thread