Today's Smalltalk 4 You takes an overview look at the class browser in VA Smalltalk If you prefer a written walkthrough to video, then skip down to it. If you have trouble viewing it here in the browser, you can also navigate directly to YouTube. To watch now, click on the image below:
You can also watch it on YouTube:
Today we'll take a look at the code browser in VA Smalltalk - starting with the Class Browser. Go to the launcher, and pull down the tools menu:
You should see something like this pop up:
You should see the class browser, allowing you to start looking at the implementation:
Going from left to right, you have the classes, listed in alphabetical order. The next pane over is Applications - each class is defined in exactly one application, and may be extended in many others. Select an application, and you'll see the methods defined for the selected class in that application. The next pane over is method categories - the bolded ones are in use for the selected application, while the grayed out ones are in others. Finally, all the way to the right is the method pane - where you'll see the methods defined for the selected application and category.
Note that you can select class or instance methods (below the method pane), and you can select method types - public, private, or, ignoring the distinction, all:
Now, select Private under the class list pane. Note that all of the public classes (such as Object) are now grayed out. In VA Smalltalk, you can define classes as private, not just methods. The browser operates the same way regardless of this selection; it's simply a filter. Going back to the public view, let's select class Object. At the bottom you have the source pane, and there are a few different modes there as well, controlled by the tabs above the pane. Select Class Definition to see the definition of the class:
Select Method Definition to return to the default view, source for the selected method:
Note that VA allocates some extra options for documentation. In addition to standard Smalltalk comments, there are tabs for Method Comments and Method Notes:
And that wraps up a quick tour of the class browser. We'll look at the other kinds of browsers, as well as the menus and toolbar, in other tutorials.
Need more help? There's a screencast for this topic which you may want to watch. Questions? Try the "Chat with James" Google gadget over in the sidebar.
[st4u74-iPhone.m4v ( Size: 7186016 )]