-->
Previous Table of Contents Next


The method category pop-up menu appears when you press the menu mouse button while the pointer is in the method category view. The functions available from this menu are shown in Figure 31.6 and explained in Table 31.4.


Figure 31.6.  The Method Category pop-up menu.

Table 31.4. Method Category pop-up menu functions.

Function Description

fileOut Saves the source code of the currently selected method category in a file named className-category.st.
printOut Sends the source code of the currently selected method category to the printer.
spawn Starts a method category browser on the currently selected method category of the currently selected class.
spawn category Starts a browser on all methods of the class which have the same category as the currently selected one.
find method here Searches for the method that implements a specified selector.
find method Searches up in the class hierarchy for the first class implementing the selector you specify in the dialog box.
new category Enables you to add a new category to the list.
copy category Enables you to copy all methods in a class category to the currently selected class.
create access methods Creates methods to access instance variables.
rename Renames the currently selected method category.
remove Removes all methods in the currently selected class that are members of the currently selected method category.

The method list pop-up menu appears when you press the menu mouse button while the pointer is in the method list view. The functions available from this menu are shown in Figure 31.7 and explained in Table 31.5.


Figure 31.7.  The Method List pop-up menu.

Table 31.5. Method List pop-up menu functions.

Function Description

fileOut Saves the currently selected method in a file named className-selector.st.
printOut Sends the source code of the currently selected method to the printer.
spawn Starts a browser for editing this method.
senders Starts a new browser on all methods sending a specific message.
local sender Same as senders but limits the search to the current class and its subclasses.
implementors Starts a new browser on all methods implementing a specific message.
globals Starts a new browser on all methods that are accessing a global that is either a global variable or a symbol, as well as all methods sending a corresponding message.
new method Enables you to create a new method from a template in the code view.
change category Enables you to change the category of the selected method.
remove Removes the currently selected method.

When you add or remove instance variables to or from a system class description and accept (that is, save the changes), the system creates a new class instead of changing the old one. The original class still exists to give existing instances of the class a valid class even though it is no longer accessible by name. After the change, you can no longer edit the old class.


NOTE:  
It is recommended that you don’t change the definition of system classes, only private ones. It is safer to use the copy category function to copy an existing class and its methods to a new class and modify the new class. This is especially important for classes which are used by the system itself since changes can lead to problems in the operation of the ST/X environment.

The code view is the lower half of the System Browser. It is here that you can modify the class or instance definitions as well as methods. The pop-up menu for this area is the edit menu that appears in every text editing view in ST/X. The functions in this menu are discussed in the “Editing in Browsers” section of this chapter.

The Class Hierarchy Browser

When the Class Hierarchy Browser is selected, a dialog box appears which asks for the name of class. If you enter a valid class, the Class Hierarchy Browser appears for that class. This is the same as the System Browser except there is no class category list since this is for one specific class. The pop-up menus for each of the four subviews are the same as in the System Browser.

Implementors

When the Implementors option is selected, a dialog box appears which asks for a selector. A selector is the name of the type of operation a message requests of its receiver.

If you enter a valid selector, an Implementors view will be displayed. This view is similar to the one shown in Figure 31.8.


Figure 31.8.  The Implementors view.

The Implementors view contains a list of the methods that implement the method specified by the selector. The pop-up menu for the top half of the Implementor view is the same as the pop-up menu for the method list subview which was discussed in the “The System Browser” section of this chapter.

Senders

When the Senders option is selected, a dialog box appears that asks for a selector. If you enter a valid selector, then a Senders view will be displayed. This view is similar to the one shown in Figure 31.9.


Figure 31.9.  Senders view.

The Senders view contains a list of the methods that send the selected message. The pop-up menu for the top half of the Senders view is the same as the pop-up menu for the method list subview which was discussed in the “The System Browser” section.


Previous Table of Contents Next