Now that you have implemented open, you can implement the remaining ten methods of class Chooser. The first seven methods define different parts of the user interface. The remaining three methods add items to a list box and perform functions when a push button is pressed or when the window closes.Method createWindowMethod createWindow defines the window for DevelopChooser. To implement the method, do the following:
1. From the Applications Browser opened on DevelopChooser, select public underneath the list of methods so the method settings change to private and instance.
2. Add a new category: Window Creation.Method createWindow
5. Save the method. If you typed in the text shown above, createWindow is displayed in the list of methods.Follow the above steps to create the following six more methods for the Window Creation category.Method createFormMethod createLabelMethod createListMethod createButtonMethod displayWindowMethod setCursorBusyMethod addApplicationsToListMethod addApplicationsToList defines what application names are shown in the list box. To implement it, do the following:
1. From the Applications Browser opened on DevelopChooser, select public underneath the list of methods so the method settings change to private and instance.
2. Add the category List Operations.Stopwatch, TextEditor, and TimeLogger are the names of main classes in other applications that you can create by completing the examples in this book.Method destroyCallback:clientData:callData:The method destroyCallback:clientData:callData: enables you to close the window for DevelopChooser when you are finished using it. To implement the method, do the following:
1. Method executeCallback:clientData:callData:The method executeCallback:clientData:callData: enables you to open one of the applications named in the list box. To implement the method, do the following:
1.
2. Note the words new open in this method. The classes Chooser, Stopwatch, TextEditor, and TimeLogger, when completed, each open an instance when their class name followed by new open is evaluated in a Transcript or Workspace window.If you are using views created with the Composition Editor, you can generally open the views by replacing new open with newPart openWidget.
|