Re: Core Data: Begin+End Undo Group = Dirty Dot. Why?
Re: Core Data: Begin+End Undo Group = Dirty Dot. Why?
- Subject: Re: Core Data: Begin+End Undo Group = Dirty Dot. Why?
- From: Jerry Krinock <email@hidden>
- Date: Fri, 13 Nov 2009 19:44:36 -0800
On 2009 Nov 13, at 19:06, Kyle Sluder wrote:
On Fri, Nov 13, 2009 at 6:53 PM, Jerry Krinock <email@hidden> wrote:
Why would the dirty dot become dirty when no change was made to the
store?
I don't see any logical reason for this.
Because NSDocument change count is linked to the NSUndoManager
notifications. See
http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/Documents/Tasks/FAQ.html#/
/apple_ref/doc/uid/20000954
Kyle, I just studied the section in there titled "What's all this
change count stuff?", which is the only place where "change count" is
mentioned, but I'm sorry I just don't see any explanation of why the
document would become dirty when no undo operations have been
registered. Beginning and ending an undo group is not changing the
document and should not be counted as a change.
Maybe you or someone could explain it a little better?
In my real app, I often manually begin and end a "super undo group".
AppKit already does this for you. See -[NSUndoManager groupsByEvent]
http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSUndoManager_Class/Reference/Reference.html#/
/apple_ref/doc/uid/20000211-CHDCHADA
Yes it does, but once you build a Core Data app which is more
complicated than DepartmentAndEmployees, you'll be very disappointed
with out-of-box Undo operation. One problem is that users typically
need to click Undo several times to undo what they may have done with
one click. There are threads on this in the list archives, or google:
core data undo fishmeal.
_______________________________________________
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