Smalltalk User Guide : Making your own applications : Implementing methods : Implementing methods--The basic steps
Implementing methods--The basic steps
To implement a method, you complete these basic steps:
1. Open an Applications Browser, Classes Browser, Hierarchy Browser, Application Browser, or Class Browser.
2. Select the application and class to which you want to add the method.
3. Specify whether you want the method to belong to a class or instance and be public or private.
4. If you are categorizing methods, select the category. If the category does not yet exist, create it by selecting Add from the Categories menu; then enter the new category name in the displayed prompter.
If you are not categorizing methods, go on to step 5. After you implement the method, the list of categories will display Not categorized. Of course, you can always go back later and categorize the methods.
Not categorized indicates that methods of the type you have specified (class or instance, public or private) exist, but are not assigned to a method category. To view those methods, select Not categorized.
5. From the Methods menu, select New Method Template. A template is displayed in the description pane.
6. Edit the template to add your source code.
7. Save the method.
Remember: to save a method, you save the source code that is in the bottom part of a browser. The three ways to save a method are as follows:
Select Save from the File menu.
With the mouse pointer inside the text pane, click on mouse button two. Select Save from the popup menu.
With the text pane in focus (the text pane has a text cursor), press Ctrl+S.
Last modified date: 05/19/2020