The classic pattern you see in Smalltalk is
Then what you do, is navigate to the method, highlight the comment and do it. If you're doing it a lot, it gets tedious to select the comment and then execute it.
So I made a simple little package called RBEasyExampleMethods, put in the repository. It makes it so you can just double click on a method in the browser, and if it looks like an example, it runs it. It looks like an example when it's
- a class side method
- unary (no arguments)
- starts with 'example' OR lives in a category that starts with 'example'
It should work with VisualWorks versions from quite a ways back. Enjoy!