Question

How do I undo the removal of a method in Squeak Smalltalk?

Was it helpful?

Solution

  1. 'World Menu'->'open'->'simple change sorter'
  2. In the top-right pane, select the class from which the method was removed.
  3. In the middle pane, select the removed method.
  4. Right click on the method name, bringing up a menu
  5. Select "versions"
  6. When the versions tool comes up, select the top (most recent) version, which is the one you deleted.
  7. Click the "revert" button

When you browse your class, you will see that the method is restored.

OTHER TIPS

If you use OmniBrowser and the Refactoring Tools you have unlimited undo/redo on all your code changes like in any other modern editor. Select in the context menu Refactor > Undo.

You can open your changes file:

  • Tools menu at the top of your screen.
  • File List (which should open in the right place).
  • In the upper right pane select the changes file (given an image called Foo.image, you'd look for Foo.changed).
  • Hit the "recent changes" button, browsing as far back as the latest (top) snapshot.
  • All method additions, alterations, deletions, DoIts are listed in the list that pops up.
  • Select the method/s you want, right click (I can never remember the colours for mouse buttons) and "fileIn selections".
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top