📄 ch36.htm
字号:
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<SCRIPT>
<!--
function displayWindow(url, width, height) {
var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>
-->
<UL>
<LI><A HREF="#Heading1">- 36 -</A>
<UL>
<LI><A HREF="#Heading2">SmallTalk/X</A>
<UL>
<LI><A HREF="#Heading3">What Is SmallTalk/X?</A>
<LI><A HREF="#Heading4">How to Install SmallTalk/X</A>
<LI><A HREF="#Heading5">NOTE</A>
<LI><A HREF="#Heading6">Invoking SmallTalk/X</A>
<LI><A HREF="#Heading7">Getting Around in ST/X</A>
<LI><A HREF="#Heading8">The Browsers Option</A>
<UL>
<LI><A HREF="#Heading9">The System Browser</A>
</UL>
<LI><A HREF="#Heading10">NOTE</A>
<UL>
<LI><A HREF="#Heading11">The Class Hierarchy Browser</A>
<LI><A HREF="#Heading12">Implementors</A>
<LI><A HREF="#Heading13">Senders</A>
<LI><A HREF="#Heading14">The Changes Browser</A>
</UL>
<LI><A HREF="#Heading15">NOTE</A>
<UL>
<LI><A HREF="#Heading16">Directory Browser</A>
</UL>
<LI><A HREF="#Heading17">The Workspace Option</A>
<LI><A HREF="#Heading18">The File Browser Option</A>
<LI><A HREF="#Heading19">The Projects Option</A>
<LI><A HREF="#Heading20">The Utilities Option</A>
<LI><A HREF="#Heading21">The Goodies Option</A>
<LI><A HREF="#Heading22">The Games & Demos Option</A>
<LI><A HREF="#Heading23">Editing in Browsers</A>
<LI><A HREF="#Heading24">Using the Inspector</A>
<LI><A HREF="#Heading25">Using the Debugger</A>
<LI><A HREF="#Heading26">Summary</A>
</UL>
</UL>
</UL>
<P>
<HR SIZE="4">
<H2 ALIGN="CENTER"><A NAME="Heading1<FONT COLOR="#000077">- 36 -</FONT></H2>
<H2 ALIGN="CENTER"><A NAME="Heading2<FONT COLOR="#000077">SmallTalk/X</FONT></H2>
<P><I>by Rick McMullin</I></P>
<P>IN THIS CHAPTER</P>
<UL>
<LI>What Is SmallTalk/X?
<P>
<LI>How to Install SmallTalk/X
<P>
<LI>Invoking SmallTalk/X
<P>
<LI>Getting Around in ST/X
<P>
<LI>The Browsers Option
<P>
<LI>The Workspace Option
<P>
<LI>The File Browser Option
<P>
<LI>The Projects Option
<P>
<LI>The Utilities Option
<P>
<LI>The Goodies Option
<P>
<LI>The Games & Demos Option
<P>
<LI>Editing in Browsers
<P>
<LI>Using the Inspector
<P>
<LI>n Using the Debugger
</UL>
<P><BR>
This chapter describes the SmallTalk/X (ST/X), 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.
In this chapter we will see
<UL>
<LI>What SmallTalk/X is
<P>
<LI>How to install SmallTalk/X
<P>
<LI>How to invoke SmallTalk/X
<P>
<LI>How to get around in SmallTalk/X
</UL>
<P>This chapter gives you an overview of the SmallTalk/X application. After reading
the chapter you should be familiar with the facilities that SmallTalk/X provides
and be able to navigate your way through the SmallTalk/X user interface.
<H3 ALIGN="CENTER"><A NAME="Heading3<FONT COLOR="#000077">What Is SmallTalk/X?</FONT></H3>
<P>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.</P>
<P>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.</P>
<P>SmallTalk/X was developed by Claus Gittinger and was first released in 1988. It
is almost identical to 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 will
be able to combine the speed of development that SmallTalk provides with the speed
of execution that C provides.
<H3 ALIGN="CENTER"><A NAME="Heading4<FONT COLOR="#000077">How to Install SmallTalk/X</FONT></H3>
<P>Before installing SmallTalk/X, you must first retrieve it from <TT>sunsite.unc.edu</TT>
in the <TT>/pub/Linux/devel/lang/smalltalkx</TT> directory. Once there, you will
find the following files:
<UL>
<LI><TT>COPYRIGHT</TT> As the filename suggests, this is the SmallTalk/X copyright
information document.
<P>
<LI><TT>INDEX</TT> Provides a list of files in the directory.
<P>
<LI><TT>LICENSE</TT> The distribution license for SmallTalk/X.
<P>
<LI><TT>README</TT> Contains a brief discription of how to get SmallTalk/X running.
<P>
<LI><TT>bitmaps.tar.Z</TT> Contains sample graphics that can be used to dress up
the visual appeal of your programs.
<P>
<LI><TT>doc.tar.Z</TT> The documentation set for SmallTalk/X. This package also includes
several demos.
<P>
<LI><TT>exe.tar.Z</TT> The executable archive. Although this is really the only file
you need to download to get SmallTalk/X up and running, installing the bitmap, documentation,
goodies, and source files is also highly recommended.
<P>
<LI><TT>goodies.tar.Z</TT> Various extras thrown in for your enjoyment.
<P>
<LI><TT>source.tar.Z</TT> Support and library files needed to get the most out of
SmallTalk/X.
</UL>
<P>To install SmallTalk/X, perform the following steps as <TT>root</TT>.
<DL>
<DD><B>1.</B> Create a directory called <TT>/usr/local/lib/smalltalk</TT>.<BR>
<BR>
<B>2.</B> Copy the following files into the <TT>/usr/local/lib/smalltalk</TT> directory.<BR>
<FONT COLOR="#0066FF">bitmaps.tar.Z<BR>
doc.tar.Z<BR>
exe.tar.Z<BR>
goodies.tar.Z<BR>
source.tar.Z</FONT>
</DL>
<PRE><FONT COLOR="#0066FF"></FONT></PRE>
<DL>
<DD><B>3.</B> Uncompress and un<TT>tar</TT> these files by entering the following
commands:<FONT COLOR="#0066FF"><BR>
uncompress *.Z<BR>
tar -xf bitmaps.tar<BR>
tar -xf doc.tar<BR>
tar -xf exe.tar<BR>
tar -xf goodies.tar<BR>
tar -xf source.tar</FONT>
</DL>
<PRE><FONT COLOR="#0066FF"></FONT></PRE>
<DL>
<DD><B>4.</B> You can now delete all of the <TT>tar</TT> files by typing the following
command:<FONT COLOR="#0066FF"><BR>
rm -f *.tar</FONT>
</DL>
<PRE><FONT COLOR="#0066FF"></FONT></PRE>
<DL>
<DD><B>5.</B> Finally, create the following links:<FONT COLOR="#0066FF"><BR>
ln /usr/i486-linuxaout/lib/libX11.so.3.1.0 /usr/lib/libX11.so.3<BR>
ln /usr/i486-linuxaout/lib/libXt.so.3.1.0 /usr/lib/libXt.so.3</FONT>
</DL>
<PRE><FONT COLOR="#0066FF"></FONT></PRE>
<P>The SmallTalk/X program should now be installed and ready to go.
<DL>
<DT></DT>
</DL>
<DL>
<DD>
<HR>
<A NAME="Heading5<FONT COLOR="#000077"><B>NOTE:</B> </FONT>If you do not have
write access to the <TT>/usr/local/lib</TT> directory, install SmallTalk/X in some
other directory by following the same steps listed above. If you do this you must
set the <TT>SMALLTALK_LIBDIR</TT> variable to be equal to the new directory.
<HR>
</DL>
<H3 ALIGN="CENTER"><A NAME="Heading6<FONT COLOR="#000077">Invoking SmallTalk/X</FONT></H3>
<P>You invoke SmallTalk/X by typing<FONT COLOR="#0066FF"></FONT>
<PRE><FONT COLOR="#0066FF">smalltalk
</FONT></PRE>
<P>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 <TT>smalltalk.rc</TT>
to set up the default behavior for your environment. The image file that is loaded
by default is called <TT>st.img</TT>, 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 <TT>.img</TT>.
To invoke ST/X with an image other than <TT>st.img</TT>, type the following command
at the prompt:<FONT COLOR="#0066FF"></FONT>
<PRE><FONT COLOR="#0066FF">smalltalk -i nameofImage.img
</FONT></PRE>
<H3 ALIGN="CENTER"><A NAME="Heading7<FONT COLOR="#000077">Getting Around in
ST/X</FONT></H3>
<P>Once ST/X is invoked, two windows or views will appear. The Transcript view and
the Launcher menu. The Transcript view is shown in Figure 36.1.
<P>
<A HREF="../art/36/36fig01.gif"><B>Figure 36.1.</a></B><I>The Transcript view.</I>
<P>The Transcript is the console where relevant systems information is shown. The
Launcher menu is shown in Figure 36.2.</P>
<P>The Launcher allows access to the tools you will need to program your application.
Table 36.1 gives the options available from the Launcher and a brief description
of each.
<P>
<A HREF="../art/36/36fig02.gif"><B>Figure 36.2.</a></B></FONT> <I>The Launcher menu. </I><BR>
<CENTER>
<P><FONT SIZE="4"><B>Table 36.1.</B> The Launcher menu options. </FONT>
<TABLE BORDER="0">
<TR ALIGN="LEFT" rowspan="1">
<TD WIDTH="92" ALIGN="LEFT"><I>Option</I></TD>
<TD ALIGN="LEFT"><I>Description</I></TD>
</TR>
<TR ALIGN="LEFT" rowspan="1">
<TD WIDTH="92" ALIGN="LEFT" VALIGN="TOP">Browsers</TD>
<TD ALIGN="LEFT" VALIGN="TOP">The pull-right menu of this option gives you access to browsers, senders, and implementors.</TD>
</TR>
<TR ALIGN="LEFT" rowspan="1">
<TD WIDTH="92" ALIGN="LEFT" VALIGN="TOP">Workspace</TD>
<TD ALIGN="LEFT" VALIGN="TOP">This option brings up a workspace view.</TD>
</TR>
<TR ALIGN="LEFT" rowspan="1">
<TD WIDTH="92" ALIGN="LEFT" VALIGN="TOP">File Browser</TD>
<TD ALIGN="LEFT" VALIGN="TOP">This browser allows inspection and manipulation of files</TD>
</TR>
<TR ALIGN="LEFT" rowspan="1">
<TD WIDTH="92" ALIGN="LEFT" VALIGN="TOP">and directories.</TD>
<TD ALIGN="LEFT" VALIGN="TOP"></TD>
</TR>
<TR ALIGN="LEFT" rowspan="1">
<TD WIDTH="92" ALIGN="LEFT" VALIGN="TOP">Projects</TD>
<TD ALIGN="LEFT" VALIGN="TOP">This option allows you to choose an existing or new project.</TD>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -