29.11.2014 Views

Smalltalk and Object Orientation: an Introduction - Free

Smalltalk and Object Orientation: an Introduction - Free

Smalltalk and Object Orientation: an Introduction - Free

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Class categories. These are group s of classes which are categorized for convenience. One of these<br />

categories may be selected (as in the figure); the classes in this category are then<br />

presented in the next subview.<br />

Class Names. Classes in the selected c ategory are presented. One of these classes may be selected<br />

(for example, the class object is selected); various categories of messages are then<br />

presented in the next subview.<br />

Message categories. These are the categories of messages which c <strong>an</strong> be sent to either inst<strong>an</strong>ces of<br />

the selected class ( inst<strong>an</strong>ce selected) or to the class itself ( class selected). One of these<br />

categories may be selected; all message selectors in this category are presented in the<br />

right-most subview.<br />

These message categories are also known as protocols. In the reminder of the chapters we shall refer to<br />

this window (p<strong>an</strong>e) as containing protocols <strong><strong>an</strong>d</strong> thus it is the protocol window.<br />

Message Selectors . All of the message selectors (essentially method names) i n the protocol are<br />

presented. One of these messages may be selected, its method (the code executed when<br />

this message is received) will be shown in the lower (code view) area. For example, in<br />

Figure 4.3 the isNil message is selected.<br />

The code view window. This window is used to browse <strong><strong>an</strong>d</strong> define classes, write methods etc.<br />

You will find that off the right mouse button (if you have a three mouse button then it is the middle<br />

button) each window will produ ce a different menu. These are the window specific menus. You will<br />

make extensive use of them, so get familiar with what is on each menu. Figure 4.4 illustrates each of the<br />

menus for each of the five different windows.<br />

Category Class Protocol Message Code<br />

Figure 4.4: The System Browser Menus<br />

There are a number of other browsers <strong><strong>an</strong>d</strong> inspectors in the <strong>Smalltalk</strong> system, for example the<br />

Protocol Brows er <strong><strong>an</strong>d</strong> the Method Browser . They are condensed versions of the System Browser<br />

which possess specific views onto the class hierarchy or onto a particular class. If you have obtained the<br />

adv<strong>an</strong>ced programmer’s tools with VisualWorks you will also be able to us e the Full Browser. This is<br />

<strong>an</strong> excellent browser which possesses a few more features th<strong>an</strong> the basic system browser.<br />

51

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!