Re: NSUndoManager & NSTableView editing
Re: NSUndoManager & NSTableView editing
- Subject: Re: NSUndoManager & NSTableView editing
- From: Pete Yandell <email@hidden>
- Date: Thu, 26 Sep 2002 23:42:29 +1000
On Thursday, September 26, 2002, at 08:28 PM, Bill Cheeseman wrote:
>
on 02-09-26 1:42 AM, Pete Yandell at email@hidden wrote:
>
>
> A problem occurs when you do this: double click a row to edit it,
>
> change the text, then click the button to add a row. The edited row
>
> is
>
> changed and a new row is added, but the undo events for both these
>
> things are grouped together because they both occur within the one
>
> runloop. Choosing Undo in the Edit menu will then undo both in one
>
> hit, whereas they should be separate undo events.
>
>
The idea is to force the row being edited to end editing gracefully
>
(that
>
is, by validating its contents in case you have a formatter attached
>
to it
>
or some other validation technique), before you add the new row.
Doesn't help! If I put a [[tableView window] makeFirstResponder:nil]
in the action method for my "add row" button, the graceful end to the
editing gets grouped in with the creation of the new row as far as the
undo manager is concerned. As long as they both happen within the one
cycle through the runloop they're going to be grouped, right?
Pete Yandell
http://pete.yandell.com/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.