Re: Field editor undo vs document dirty
Re: Field editor undo vs document dirty
- Subject: Re: Field editor undo vs document dirty
- From: Kyle Sluder <email@hidden>
- Date: Tue, 7 Apr 2009 07:07:55 -0400
On Tue, Apr 7, 2009 at 2:52 AM, Quincey Morris
<email@hidden> wrote:
> The first thing I don't understand is whether that's a bug. Although the
> document isn't really changed (because the typing hasn't been committed
> yet), but the presence of undoable typing perhaps ought to prevent the
> document window from closing without first asking whether to save the
> changes.
This is indeed intentional, for the reasons you specify. See
http://homepage.mac.com/tom_zepko/cocoa/topics/undo-redo.html for
more.
> Can anyone explain the simple answer to me, or suggest a strategy if the
> answer isn't so simple?
Hook up an object as the field editor's delegate and return the same
undo manager in -undoManagerForTextView: that is used for the window.
--Kyle Sluder
_______________________________________________
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