Re: Detecting Managed Object Property Change From Undo Redo
Re: Detecting Managed Object Property Change From Undo Redo
- Subject: Re: Detecting Managed Object Property Change From Undo Redo
- From: Richard Charles <email@hidden>
- Date: Tue, 27 Jan 2015 12:06:15 -0700
> On Jan 27, 2015, at 11:28 AM, Kyle Sluder <email@hidden> wrote:
>
> Historically, I've not been a big Core Data user, but does
> -[NSManagedObject setPrimitiveValue:forKey:] not do what you want?
That is a key-value coding method. If I remember correctly, key-value coding does not bypass existing accessor methods, if they exist. My guess it that these methods eventually call the appropriate primitive accessor to access the backing store. If the primitive accessor is implemented dynamically then that method would be called. If the primitive accessor is implemented by the subclass then that method would be called. If the modeled property is defined as a ivar and no primitive assessor is implemented by the subclass then the frameworks would attempt to set the ivar directly.
I have not used key-value coding much in my managed object subclasses but in this instance I don’t think it would help.
Richard Charles
_______________________________________________
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