• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Undo in a Sheet -- no takers?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Undo in a Sheet -- no takers?


  • Subject: Re: Undo in a Sheet -- no takers?
  • From: Bill Cheeseman <email@hidden>
  • Date: Sun, 07 Oct 2001 10:38:22 -0400

on 10/7/01 7:57 AM, Mason Mark at email@hidden wrote:

> I also now have a couple sheets that need to support undo (they have a text
> editing fields in the sheet). My window controller returns an undo manager
> for the sheet panel, but Undo is never available.
>
> In the debugger, I have confirmed:
>
> a) my window controller is returning a usable undo manager
> b) the undo manager is getting actions registered with it--that is, the
> undo stack contains "Undo Typing" actions when you examine it in gdb
>
> However, the Undo menu item remains titled "Undo" and disabled.

I haven't attacked this problem yet, so I don't have any answers.

But is this relevant? -- The release notes for something-or-other, probably
the AppKit, state that one of the "fixes" in Mac OS X 10.1 is that Cocoa now
more strictly enforces the rule that a sheet is document-modal. It does
this, at least in part, by disabling certain menu items while a sheet is
present in the frontmost document window.

I wonder if they thought undo and redo should not be available while a sheet
is present, since they have no way of knowing whether items in the undo and
redo stacks could be used to alter the document, in violation of the
document modality sheet rule. Something to think about, anyway.

Thinking along the same lines, if you do succeed in finding a way to enable
the undo menu item, how will you prevent the user from undoing and redoing
actions that should not be changeable while a document-modal sheet is
present? I suppose you might use a completely separate undo manager that
allows undo and redo only of items in the sheet, and only while the sheet is
up. Interesting problem.

It is questions like this that have made me wonder whether it is ever
appropriate to have text fields and other user controls in a sheet if they
can change document settings. It's ok in a save panel, I suppose, because
the file name under which to save a document isn't in the nature of a
document setting that should be undoable.

--

Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com

The AppleScript Sourcebook - http://www.AppleScriptSourcebook.com
Vermont Recipes - http://www.stepwise.com/Articles/VermontRecipes
Croquet Club of Vermont - http://members.valley.net/croquetvermont


  • Follow-Ups:
    • Re: Undo in a Sheet -- no takers?
      • From: Mason Mark <email@hidden>
  • Prev by Date: Re: Slightly OT: what about the Services?
  • Next by Date: Re: Slightly OT: what about the Services?
  • Previous by thread: Re: Undo in a Sheet -- no takers?
  • Next by thread: Re: Undo in a Sheet -- no takers?
  • Index(es):
    • Date
    • Thread