> On 25 Jan 2015, at 06:35, Richard Charles <rcharles...@gmail.com> wrote: > > Core Data generated primitive accessors are used to get and set values from > and to the managed object's private internal store. Core Data generated > primitive accessors do not have change notification. If primitive accessors > are present, Core Data will use them during undo and redo. > > A managed object may have resources that need to be updated when a property > changes. During undo and redo primitive accessors are used to change the > property but because primitive accessors do not have change notification > there is no way for the managed object to be notified that the property has > changed. > > The only solution seems to be to use custom primitive accessors that have > change notification. > > What am I doing wrong?
You are mistaken. Core Data *does* fire KVO notifications during undo/redo. Its internal implementation does something along these lines: [object willChangeValueForKey:key]; [object setPrimitiveValue:previousValue forKey:key]; [object didChangeValueForKey:key]; _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com