-->
Previous | Table of Contents | Next |
by Rick McMullin
This chapter describes the Smalltalk/X (ST/X) application that is included on the Linux CD-ROM. ST/X is a fairly complete implementation of the Smalltalk-80 programming environment. Anyone who has used Smalltalk-80 or any other version of Smalltalk will be impressed with this freely available implementation. This chapter also gives you an overview of the Smalltalk/X application. After reading the chapter you will be familiar with the facilities that Smalltalk/X provides and be able to navigate your way through the Smalltalk/X user interface.
When describing Smalltalk/X, it is probably appropriate to start with a description of Smalltalk itself. Smalltalk is an object-oriented programming language that has been a continuing development project at ParcPlace Systems since the early 1970s. Although it was not the first object-oriented language, it was the first object-oriented language to gain wide use in the industry.
Smalltalk has been around for about 15 years now, but it was not until recently that it started to become popular. Many universities now teach a Smalltalk course as part of their standard computer science curriculum, and many companies have seen the value that Smalltalk adds in terms of quick development.
Smalltalk/X was developed by Claus Gittinger and was first released in 1988. It is almost identical to the behavior of the Smalltalk 80 implementation of the Smalltalk language. Smalltalk/X comes complete with an application launcher, several different browsers for browsing through the Smalltalk class hierarchy, and a very powerful debugging utility. The unique aspect of Smalltalk/X is that it can also behave as a Smalltalk-to-C translation utility. This is a very useful feature because this means that you are able to combine the speed of development that Smalltalk provides with the speed of execution that C provides.
Although Smalltalk/X is on the Linux CD-ROM that comes with this book, it is not installed as part of the default install scripts. The Smalltalk/X files can be found in the devel/smalltalkx directory on the CD-ROM. To install Smalltalk/X, perform the following steps as root.
bitmaps.tar.Z doc.tar.Z exe.tar.Z goodies.tar.Z source.tar.Z
uncompress *.Z tar -xf bitmaps.tar tar -xf doc.tar tar -xf exe.tar tar -xf goodies.tar tar -xf source.tar
rm *.tar
The Smalltalk/X program should now be installed and ready to go. If you do not have write access to the /usr/local/lib directory, you can install Smalltalk/X in some other directory by following the same steps listed above. If you do this, you must set the SMALLTALK_LIBDIR variable to be equal to the new directory.
You invoke Smalltalk/X by typing
smalltalk
in an Xterm window. When ST/X starts, it checks to see if there is an image file for it to use. If it cannot find an image file, it uses a file called smalltalk.rc to set up the default behavior for your environment. The image file that is loaded by default is called st.img and contains a snapshot of what your ST/X environment looked like the last time you exited. This allows you to resume exactly where you left off. You can save a snapshot under any name with the extension .img. To invoke ST/X with an image other than st.img, enter the following command at the prompt:
smalltalk -i nameofImage.img
Once ST/X is invoked, two windows or views appear. The Transcript view and the Launcher menu. The Transcript view is shown in Figure 31.1.
Figure 31.1. The Transcript view.
The Transcript is the console where relevant systems information is shown. The Launcher menu is shown in Figure 31.2.
Figure 31.2. The Launcher menu.
The Launcher allows access to the tools you will need to program your application. Table 31.1 gives the options available from the Launcher and a brief description of each.
Option | Description |
---|---|
Browsers | The pull-right menu of this option gives you access to browsers, senders, and implementors. |
Workspace | This option brings up a workspace view. |
FileBrowser | This browser allows inspection and manipulation of files and directories. |
Projects | This option allows you to choose an existing or new project. |
Utilities | This contains tools specific to your programming needs. |
Goodies | This contains other non-programming related tools. |
Games & Demos | This contains some sample programs and games to play. |
Info & Help | This contains topics that give you help and information on the ST/X environment and programming in Smalltalk. |
Snapshot | This option takes a snapshot of your present ST/X environment and asks for the name of the image file you wish to store the snapshot in. |
Exit | This option allows you to exit ST/X immediately, or exit and save a snapshot of the current environment. |
The following sections describe most of these options in more detail.
Previous | Table of Contents | Next |