Making your own applications : Implementing methods : Example: Adding methods to the defined class Chooser : Implementing the method open

Implementing the method open
You can implement the methods in any order. This example begins with open, a public instance method of Chooser that helps define the interface. To implement open, do the following:
1.
2.
3.
4.
From the Categories menu, select Add. A window opens, requesting a name for the category.
5.
Type Startup, then select OK.
6.
With Startup highlighted, select New Method Template from the Methods menu. A template is displayed in the description pane.
New method template
7.
open
"Public - Create a window that contains a list box of applications
and a push button that you select to open an application."
self createWindow.
self createForm.
self createLabel.
self createList.
self createButton.
self setCursorBusy.
self displayWindow.
8.
 
Tips
If syntax error or a similar phrase is displayed, check for a misspelled word, a missing word, or missing punctuation. (Ensure you erase the phrase.)
If a debugger window opens, read the message in its top pane. It should indicate how you can correct the method open. Make any needed corrections in the method; then pop up the menu and select Save again. For more information on the debugger, see Debugging code.