[plt-scheme] proper undo handling

From: Mike T. Machenry (dskippy at ccs.neu.edu)
Date: Wed Apr 16 17:03:21 EDT 2003

Hey, I am currently adding undo/redo behavior to my test-suite tool. I wanted
to run my implementation by everyone. It has been the case at least once (with
modified? flags of editors) that there was a built in automated way to do what
I was trying to do. What I am planning to do is this.  

override my frame:basic method
  (define/override (edit-menu:undo-callback item event)
    (send (get-editor) undo)
    (unless <I still need the undo menu item>
      <disable the undo menu item>))
do the same for redo
override my set-modified method to make the undo and redo menu items enabled

Does this sound right?


Posted on the users mailing list.