Re: KVO and Coredata/Undo Clarification
Re: KVO and Coredata/Undo Clarification
- Subject: Re: KVO and Coredata/Undo Clarification
- From: mmalcolm crawford <email@hidden>
- Date: Wed, 15 Mar 2006 18:47:58 -0800
On Mar 15, 2006, at 6:27 PM, email@hidden wrote:
does NSPersistenDocument know to record changes only to a variable
if its core data (not a custom ivar) value changed?
It's not clear why you think that NSPersistentDocument would record
changes? Changes are recorded by the relevant managed object
context's undo manager.
- (void)setValue:(NSData *)value
{
[self willChangeValueForKey: @"value"];
[[self valueForKey:@"data"] setValue: value forKey: @"value"];
[self didChangeValueForKey: @"value"];
}
It's not clear why you're doing this?
The change notification messages are advertising that a property with
key-path 'value' is changing. It's not. The property with key-path
'data.value' is changing... The 'data' object should be responsible
for sending its own change notification messages.
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