-->
Previous Table of Contents Next


The Browsers Option

The Browsers option in the Launcher menu gives you access to different browsers or editors that let you read and manipulate classes, methods, changes, senders, and implementors. The sub-options available are:

  System Browser
  Class Hierarchy Browser
  Implementors
  Senders
  Changes Browser
  Directory Browser

Each of these sub-options will be discussed in detail in this section.

The System Browser

The standard System Browser contains five subviews:

  Class category list
  Class list
  Method category list
  Method list
  Code view

The System Browser is shown in Figure 31.3.


Figure 31.3.  The System Browser.

Within the ST/X system, classes are assigned to a category. A category is simply an attribute used for grouping classes to make them easier to handle. To select a class category, click on the name of the category in the class category list. This is the leftmost section of the top half of the System Browser. This displays, in the class list subview, all classes belonging to that category. The class list subview is the second section from the far left of the system browser. You can also select one of two special categories: * all *, which selects all classes and lists them alphabetically; and * hierarchy *, which lists all classes in a tree by inheritance.

If you select a class in the class list, all method categories for that class will be displayed in the method category list, which is the second section from the right in the top half of the System Browser. Like class categories, method categories are simply for grouping methods according to their function. When you select a method category, all methods in that category are shown in the method list view in the far right section of the browser. The special * all * category shows all methods in alphabetical order. Selecting a method from the method list shows the corresponding method’s source code in the code view, which is the bottom half of the System Browser.

The browser enables you to change either a class or its metaclass. There are two toggle buttons, class and instance, in the same section of the browser as the class list view. Instance, which is the default, makes the changes affect the class. Selecting class makes the changes affect the metaclass.

A pop-up menu is available in each view by pressing the middle or menu mouse button while the pointer is in that view. The pop-up menu available in the class category view is shown in Figure 31.4 and the purpose of each function is shown in Table 31.2.


Figure 31.4.  The Class Category pop-up menu.

Table 31.2. Class Category pop-up menu functions.

Function Description

fileOut Saves all classes in the currently selected class category into one source file named classCategory.st.
fileOut each Saves all classes but puts each class into a separate file called className.st.
printOut Sends a printed representation of all classes selected to the printer including the method source code.
printOut protocol Sends a protocol-only representation of all classes in the category to the printer without the method’s source code.
spawn Starts a class category browser without a class category list on the currently selected class category.
spawn class Starts a full class browser which allows you to edit all code for the selected class in one view.
update Re-scans all classes in the system and updates the lists shown.
find class Pops up a dialog box to enter the name of a class you wish to search for and have displayed.
rename Renames a category and changes the category attribute of all classes in the currently selected class category.
remove Removes all classes and subclasses in the current class category.

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


Figure 31.5.  The Class List pop-up menu.

Table 31.3. Class List pop-up menu functions.

Function Description

fileOut Saves the source code of the currently selected class in a file named className.st.
printOut Sends the source code of the currently selected class to the printer.
printOut protocol Sends a protocol description of the currently selected class to the printer. The output will contain the class description, class comment, and the class’s protocol and method comments.
spawn Starts a class browser on the currently selected class.
spawn hierarchy Starts a browser on all subclasses of the currently selected class.
hierarchy Shows the hierarchy of the currently selected class in the code view.
definition Shows the class definition in the code view and allows you to change the class definition.
comment Shows the class comment in the code view and allows you to edit it.
class instvars Shows the class-instance-variables for the selected class and allows you to edit them.
variable search Provides a search facility to find different variable references and all methods referencing the searched-for variable.
new class Allows you to create a new class using the currently selected class as a template.
new subclass Same as new class but creates a subclass of the currently selected class.
rename Changes the name of the currently selected class.
remove Removes the currently selected class and all of its subclasses.


Previous Table of Contents Next