How to Use Squeak on a PC

We'll use the Towers of Hanoi program from A Taste of Smalltalk, by Kaehler and Patterson.
  1. You'll need to download the zip file, which is about 5 megs in size. Extract the files using Zip or a similar utility. Or download and execute the self-extracting archive of Squeak2.3. In either case, you'll need about 15 additional megs for the extracted files. Install the files in the same directory.
  2. Run Squeak by dropping the Squeak IMAGE file onto the Squeak 2.3 Application icon. It should come up very quickly, or not at all :-)
  3. Use a right mouse click to bring up the open menu, and open the System Browser.
  4. In the Browser, the four windows across the top are called A (class categories), B (class names), C (message categories), and D (message selectors).
  5. Select kernel-objects in area A, then Object in area B. Move the mouse into area C, and with a right mouse click bring up a menu and select "Add Item". When the little type-in window appears, type games.
  6. Move the cursor into area E, the text window, and type in the program.
  7. Do a right mouse click, and select accept. If there are any syntax errors or warnings, this is when you'll see (most of) them.
  8. Since the moveDisk routine hasn't been defined yet, Squeak will ask you to confirm that it should accept the moveTower method "as is".
  9. In area D, click the mouse so that moveTower is not selected, and then type the moveDisk method into area E.
  10. When moveDisk is typed in, do an accept on it as well.
  11. Open the transcript window.
  12. Select moveTower in area D, and then mouse over the command at the bottom, which begins with (Object new). Don't include the quotes.
  13. Select "do it", and watch it execute.
  14. If you want to save your work, then move the mouse to area C, and select the fileOut menu item. This will create a file called
  15. To read it all back in, you need to open the System Browser, and enter the command (FileStream oldFileNamed: '') fileIn. and select the doIt command.