User's Guide
The example describes how to use the TrailBlazer to implement
methods. The methods implemented define the interface for the screen
capture tool DevelopScreenCapture and place a "grabbed" BMP
file in a designated directory.
The tool has one public instance method and 29 private instance
methods. To more quickly add these methods to the system, you might
copy and paste them from this section in the online IBM Smalltalk
User's Guide. (See A shortcut: Copying code into a browser.)
For the purposes of this example, begin by implementing the method
open:
- From the enhanced browser named Loaded Applications that you have open,
ensure that DevelopScreenCapture is selected in the list of
applications (upper left pane) and ScreenPMCapture or
ScreenWinCapture is selected in the list of classes (upper middle
pane).
- Click on the down arrow to the right of the pane title Instance
Categories.
- From the displayed list, select Instance Methods.
| This example has you implement methods and then categorize them.
Alternatively, you can add the categories before implementing the
methods.
|
- Set the check boxes below the Instance Methods pane to
Private.
- Position your mouse over the Instance Methods pane (upper right
pane); then pop up a menu of available actions as to instance
methods.
- From the pop-up menu, select Template. A new method
template is displayed in the description pane.
- Using your mouse (or Ctrl+A), mark the template and then type the
following into the pane for open:
open
"Public - Creates and realizes the receiver."
self
createShell;
createWindow;
realizeWindow.
- Pop up the menu for the description pane; then select
Save.

The method name is now displayed in the list of methods and on the status
bar in the middle of the browser.
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]