Using the Class
Browser to understand Classes, Methods, Instance variables and an introduction into Class hierarchy
Tutorial 4. Class Browser |
|
Home
Tutorials | 1. Starting Smalltalk, and Terminology | 2. Precedence Rules | 3. Classes - Strings | 4. Class Browser | 5. Variables | 6. Error Messages | 12. Control Structures | 16. Dialogs | 23. Collection class | 39. OpenGUI | Information | Smalltalk Books | Student Software & Books | Hints & Tips | Sites | Download Smalltalk | Coloured code | Download Documents | ASCII Codes | Smalltalk Index |
|
Contents |
|
|
|
| LearningBook | The class browser in which classes first appear | List Your Classes | List Your Methods | Buttons |
|---|---|---|---|---|
| LB-13. | Account, Frog, HoverFrog,Toad | Add... Remove View | ||
| LB-15. | Object. | |||
| LB-17. | BlockClosure, Boolean, False, True, Converter, Lesson1, Lesson2. | |||
| LB-21. | Magnitude and 11 subclasses. Discusses the introduction of Amphibian class. Abstract class | |||
| LB-22. | Amphibian, Behaviour & 2
subclasses, CharTable, Dialog, Character, Date,
Time. Note the introduction of the Amphibian class, totally changes the Frog etc. Hierarchy. |
The View button used with new shows Metaclass | ||
| LB-23. | ClassDescription, Collection-(Sets & Dictionaries), Lottery, Association. | |||
| LB-24 | Collection-(Fixed Size: Arrays & Strings) | |||
| LB-23 | Collection-(Ordered & Sorted) | |||
| LB-27 | Beverage Customer Customer StaffMember
VatLANAdmin VendingMachine VMAccount. Note Some of this LB may be optional. |
Find, Edit | ||
| LB-31 | Stream +9 Subclasses. Note Some of this LB may be optional. |
File | ||
| LB-39 | Collection-(List, Interval, and Text) AddressBook AddressBookFixedFormat Model +2 Subclasses. Using the GUI | |||
| LB-45 | Initially no change. A set of executable files can be downloaded nearer to the end of the course, that will incrementally add additional classes, methods, instance variables and class variables for the final Hospital, MECEBSC systems. |
What is the Class browser used for.
Opening the Class BrowserFor the exercises you are going to use LB-27. You will be able to confirm what you have learnt so far in Tutorials 1-3.Do NOT attempt at this stage to alter any of the code in the Class Browser. Exercise 1. Opening the Class Browser
Class Browser Diagram DescriptionThe Class Browser window for LB-27 should now look like the following. Tip. When working
in the class browser it helps to enlarge the size of the
window, a little bit on the width, and a lot on the length.
Towards the end of the course you will be designing windows, with widgets similar to those shown in the Class Browser diagram above. Starting from the top you have 2 Tab widgets, with the Class Browser tab selected. Note that this widget is not available when you start designing your own windows. The rest of the window is described in the table below.
|
| Widget | Qty | Description |
|---|---|---|
| Labels | 3 | The labels state what the widget below the label
contains.
|
| List | 1 | Class. List all the Classes that are visible
at that stage of the course.
|
| 1 | Instance / Class variables. Depending on
selected radio button below.
|
|
| 1 | Instance / Class methods. Depending on selected
radio button below.
|
|
| Radio buttons | 2 | Instance and Class. Only one of these 2 buttons can be selected. They control the labels and contents of the 2 panes above. |
| Action button | 1 | Find. Brings up a pop up menu.
|
| 1 | Add. Brings up a radio button menu.
|
|
| 1 | Remove. Removes variables or methods that are in bold text. | |
| 1 | View. From LB-22 this button allows you to look at metaclasses for methods like new. | |
| 1 | Edit. I can't remember using this. | |
| Label | 1 | A descriptive label for the edit box below. |
| Edit | 1 | The contents displayed in this edit box depend on what has been selected in the top 3 list boxes. |
| Exercise 2a. Finding a Class.
Technique 1 You could just scroll up and down the list but as there are more than 100 entries a better technique is required.
Exercise 2b. Finding a Class. Technique 2
Exercise 3. Finding a Method
Exercise 4. Finding Examples of a Method This is useful to see how a method is used. You can find how the method that you are interested in is used within other methods.
Exercise 5. Class Hierarchy. This can be seen in the Class pane. Object is at the top of the list. All the other classes are indented.
| Home | Previous Tutorial 3. Classes - Strings | Next Tutorial 5. Variables | |
More sites by John McGuinn . HTML and Web Design | C Programming
Leeds my home town
Relax in the sun.
Benidorm Tenerife San Marino apartments to rent
Holidays and Short Breaks Manchester Airport
Leeds my home town City of Leeds information Leeds and Bradford International Airport
Leeds Web Design Web
Designers Hosting Domain
names Web site Promotion
Copyright © John McGuinn 2000 - 04