Defining the subclass Stopwatch
To create the defined class Stopwatch, which will contain methods that create the interface and calculate elapsed time, you do the following:
1. Open a standard Application Browser on DevelopStopwatch.
2. From the Classes menu of the Application Browser, select Object.
3. From the Classes menu, select Add > Subclass.
4. In the displayed prompter, type Stopwatch; then select OK. A window is displayed, prompting you to select among subclass and variableSubclass.
5. 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.
6. Add the following variable declarations to the description:
a. Add the instance variables startTime timeElapsedDisplay widgetManager timeWidgets label timeDisplay buttons startButton stopButton shell.
b. Add the pool dictionaries CwConstants CldtConstants.
7. Save the contents of the text pane.
You have just defined a new class in DevelopStopwatch.
Last modified date: 01/29/2015