User's Guide
To create the defined class Stopwatch, which will contain
methods that create the interface and calculate elapsed time, you do the
following:
- Open a standard Application Browser on DevelopStopwatch.
- From the Classes menu of the Application Browser, select
Object.
- From the Classes menu, select Add
> Subclass.
- In the displayed prompter, type Stopwatch; then select
OK. A window is displayed, prompting you to select among
subclass and variableSubclass.
- Select subclass; then select OK.
Stopwatch is displayed, indented, under Object in the
list of classes. Its class definition is displayed in the description
pane.
- Add the following variable declarations to the description:
- Add the instance variables startTime timeElapsedDisplay widgetManager
timeWidgets label timeDisplay buttons startButton stopButton
shell.
- Add the pool dictionaries CwConstants CldtConstants.
- Save the contents of the text pane.
You have just defined a new class in DevelopStopwatch.
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]