<== Previous | Contents | Next ==>

The Programming Environment (cont.)

Finishing the Project

To finish our little project, we need to add a 'forward' button to the toolbar that calls the method that we've written. I've already created an icon for the button. Copy, paste, and accept the following method into HTMLView:

Now, all that is remaining is for you to go to the #toolBar method (in the toolbar category), and add this button to the toolbar. To do this, insert the line 'add: self forwardButton;' right after the line that says 'add: self refreshButton;'. Accept and typecheck that change, and you should be done. To be sure you have really done everything right, you might want to typecheck the whole class- you can do this by choosing "Typecheck entire class" from the "Typechecking" pull-down menu.

Now you should be done. To see the forward button in action, you can use the button to create a clone of the browser window. The new window should have the forward button! Test it a little, and if it works, save the system (under "File" on the Launcher), and you will have it in the future.

The Virtual Machine ==>