Now, you must implement one public instance method and fifteen private instance methods for Stopwatch. You can implement them in any order.Method openFor this example, begin by implementing open, which calls methods that define the user interface:
1. Ensure that Stopwatch is selected.
2.
3.
5. Save the method. If you typed in the text shown above, open is shown in the list of methods.Now, define the private instance methods. The following two methods go into the Getters & Setters category and are used for displaying the elapsed time:Method timeElapsedDisplay:Method timeElapsedDisplayThe following eleven methods go into the Window Creation category:Method createWindowMethod createTopLevelShellMethod createShellMethod createFormMethod createTimeWidgetsMethod createLabelMethod createButtonsMethod createStartButtonMethod createStopButtonMethod manageChildrenMethod realizeWindowAt this point, you can open an instance of Stopwatch by evaluating the following in a Transcript or Workspace window:Method startButtonMotion:clientData:callData:Method stopButtonMotion:clientData:callData:Method calculateTime:
|