rhl34.htm
来自「linux的初学电子书」· HTM 代码 · 共 2,981 行 · 第 1/5 页
HTM
2,981 行
<HTML>
<HEAD>
<TITLE>Red Hat Linux Unleashed rhl34.htm </TITLE>
<LINK REL="ToC" HREF="index-1.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/index.htm">
<LINK REL="Index" HREF="htindex.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/htindex.htm">
<LINK REL="Next" HREF="rhl35.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/rhl35.htm">
<LINK REL="Previous" HREF="rhl33.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/rhl33.htm"></HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080">
<A NAME="I0"></A>
<H2>Red Hat Linux Unleashed rhl34.htm</H2>
<P ALIGN=LEFT>
<A HREF="rhl33.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/rhl33.htm" TARGET="_self"><IMG SRC="purprev.gif" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/purprev.gif" WIDTH = 32 HEIGHT = 32 BORDER = 0 ALT="Previous Page"></A>
<A HREF="index-1.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/index.htm" TARGET="_self"><IMG SRC="purtoc.gif" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/purtoc.gif" WIDTH = 32 HEIGHT = 32 BORDER = 0 ALT="TOC"></A>
<A HREF="rhl35.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/rhl35.htm" TARGET="_self"><IMG SRC="purnext.gif" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/purnext.gif" WIDTH = 32 HEIGHT = 32 BORDER = 0 ALT="Next Page"></A>
<HR ALIGN=CENTER>
<P>
<UL>
<UL>
<UL>
<LI>
<A HREF="#E68E293" >What Is Smalltalk/X?</A>
<LI>
<A HREF="#E68E294" >How To Install Smalltalk/X</A>
<LI>
<A HREF="#E68E295" >Invoking Smalltalk/X</A>
<LI>
<A HREF="#E68E296" >Getting Around in ST/X</A>
<LI>
<A HREF="#E68E297" >The Browsers Options</A>
<UL>
<LI>
<A HREF="#E69E401" >The System Browser</A>
<LI>
<A HREF="#E69E402" >The Class Hierarchy Browser</A>
<LI>
<A HREF="#E69E403" >Implementors</A>
<LI>
<A HREF="#E69E404" >Senders</A>
<LI>
<A HREF="#E69E405" >The Changes Browser</A>
<LI>
<A HREF="#E69E406" >Directory Browser</A></UL>
<LI>
<A HREF="#E68E298" >The Workspace Option</A>
<LI>
<A HREF="#E68E299" >The File Browser Option</A>
<LI>
<A HREF="#E68E300" >The Projects Option</A>
<LI>
<A HREF="#E68E301" >The Utilities Option</A>
<LI>
<A HREF="#E68E302" >The Goodies Option</A>
<LI>
<A HREF="#E68E303" >The Games & Demo Option</A>
<LI>
<A HREF="#E68E304" >Editing in Browsers</A>
<LI>
<A HREF="#E68E305" >Using the Inspector</A>
<LI>
<A HREF="#E68E306" >Using the Debugger</A>
<LI>
<A HREF="#E68E307" >Summary</A></UL></UL></UL>
<HR ALIGN=CENTER>
<A NAME="E66E34"></A>
<H1 ALIGN=CENTER>
<CENTER>
<FONT SIZE=6 COLOR="#FF0000"><B>34</B></FONT></CENTER></H1>
<BR>
<A NAME="E67E34"></A>
<H2 ALIGN=CENTER>
<CENTER>
<FONT SIZE=6 COLOR="#FF0000"><B>Smalltalk/X</B></FONT></CENTER></H2>
<BR>
<P>This chapter describes 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
<BR>
<UL>
<LI>What Smalltalk/X is
<BR>
<BR>
<LI>How to install Smalltalk/X
<BR>
<BR>
<LI>Invoking Smalltalk/X
<BR>
<BR>
<LI>Getting around in Smalltalk/X
<BR>
<BR>
</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.
<BR>
<BR>
<A NAME="E68E293"></A>
<H3 ALIGN=CENTER>
<CENTER>
<FONT SIZE=5 COLOR="#FF0000"><B>What Is Smalltalk/X?</B></FONT></CENTER></H3>
<BR>
<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.
<BR>
<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.
<BR>
<P>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 will be able to combine the speed of development that Smalltalk provides with the speed of execution that C provides.
<BR>
<BR>
<A NAME="E68E294"></A>
<H3 ALIGN=CENTER>
<CENTER>
<FONT SIZE=5 COLOR="#FF0000"><B>How To Install Smalltalk/X</B></FONT></CENTER></H3>
<BR>
<P>Before installing Smalltalk/X, you must first retrieve it from <A HREF="tppmsgs/msgs0.htm#72" tppabs="ftp://sunsite.unc.edu/">sunsite.unc.edu</A> in the /pub/Linux/devel/lang/smalltalkx directory. Once there, you will find the following files:
<BR>
<UL>
<LI>COPYRIGHT As the filename suggests, this is the SmallTalk/X copyright information document.
<BR>
<BR>
<LI>INDEX Provides a list of files in the directory.
<BR>
<BR>
<LI>LICENSE The distribution license for SmallTalk/X.
<BR>
<BR>
<LI>README Contains a brief discription of how to get SmallTalk/X running.
<BR>
<BR>
<LI>bitmaps.tar.Z Contains sample graphics that can be used to dress up the visual appeal of your programs.
<BR>
<BR>
<LI>doc.tar.Z The documentation set for SmallTalk/X. This package also includes several demos.
<BR>
<BR>
<LI>exe.tar.Z 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.
<BR>
<BR>
<LI>goodies.tar.Z Various extras thrown in for your enjoyment.
<BR>
<BR>
<LI>source.tar.Z Support and library files needed to get the most out of SmallTalk/X.
<BR>
<BR>
</UL>
<P>To install Smalltalk/X, perform the following steps as root.
<BR>
<OL>
<LI>Create a directory called /usr/local/lib/smalltalk.
<BR>
<BR>
<LI>Copy the following files into the /usr/local/lib/smalltalk directory.
<BR>bitmaps.tar.Z
<BR>doc.tar.Z
<BR>exe.tar.Z
<BR>goodies.tar.Z
<BR>source.tar.Z
<BR>
<LI>Uncompress and untar these files by entering the following commands from the /usr/local/lib/smalltalk directory.
<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
<BR>
<LI>You can now delete all of the tar files by typing the following command:
<BR>rm -f *.tar
<BR>
<LI>Finally, create the following links:
<BR>ln /usr/i486-linuxaout/lib/libc.so.4 /usr/lib/libc.so.4
<BR>ln /usr/i486-linuxaout/lib/libXt.so.3 /usr/lib/libXt.so.3
<BR>ln /usr/i486-linuxaout/lib/libxll.so.3 /usr/lib/libxll.so.3
<BR>ln /usr/i486-linuxaout/lib/libm.so.4 /usr/lib/libm.so.4
<BR>
</OL>
<P>The Smalltalk/X program should now be installed and ready to go.
<BR>
<BLOCKQUOTE>
<BLOCKQUOTE>
<HR ALIGN=CENTER>
<BR>
<NOTE>If you do not have write access to the /usr/local/lib directory, 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.</NOTE>
<BR>
<HR ALIGN=CENTER>
</BLOCKQUOTE></BLOCKQUOTE>
<BR>
<A NAME="E68E295"></A>
<H3 ALIGN=CENTER>
<CENTER>
<FONT SIZE=5 COLOR="#FF0000"><B>Invoking Smalltalk/X</B></FONT></CENTER></H3>
<BR>
<P>You invoke Smalltalk/X by typing
<BR>
<BR>
<PRE>
<FONT COLOR="#000080">smalltalk</FONT></PRE>
<P>in an Xterm window from the /usr/local/lib/smalltalk directory. 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, type the following command at the prompt:
<BR>
<BR>
<PRE>
<FONT COLOR="#000080">smalltalk -i nameofImage.img</FONT></PRE>
<BR>
<A NAME="E68E296"></A>
<H3 ALIGN=CENTER>
<CENTER>
<FONT SIZE=5 COLOR="#FF0000"><B>Getting Around in ST/X</B></FONT></CENTER></H3>
<BR>
<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 34.1.
<BR>
<P><B> <A HREF="34rhl01.gif" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/34rhl01.gif">Figure 34.1. The Transcript view.</A></B>
<BR>
<P>The Transcript is the console where relevant systems information is shown. The Launcher menu is shown in Figure 34.2.
<BR>
<P><B> <A HREF="34rhl02.gif" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/34rhl02.gif">Figure 34.2. The Launcher menu.</A></B>
<BR>
<P>The Launcher allows access to the tools you will need to program your application. Table 34.1 gives the options available from the Launcher and a brief description of each.
<BR>
<BR>
<P ALIGN=CENTER>
<CENTER>
<FONT COLOR="#000080"><B>Table 34.1. The Launcher menu options.</B></FONT></CENTER>
<BR>
<TABLE BORDERCOLOR=#000040 BORDER=1 CELLSPACING=2 WIDTH="100%" CELLPADDING=2 >
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
<I>Option</I>
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
<I>Description</I></FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Browsers
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
The pull-right menu of this option gives you access to browsers, senders, and implementors.</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Workspace
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
This option brings up a workspace view.</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
FileBrowser
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
This browser allows inspection and manipulation of files and directories.</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Projects
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
This option allows you to choose an existing or new project.</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Utilities
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
This contains tools specific to your programming needs.</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Goodies
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
This contains other non-programming related tools.</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Games & Demos
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
This contains some sample programs and games to play.</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
info & help
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
This contains topics that give you help and information on the ST/X environment and programming in Smalltalk.</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
snapshot
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
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.</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
exit
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
This option allows you to exit ST/X immediately or exit and save a snapshot of the current environment.</FONT>
</TABLE><P>The following sections describe most of these options in more detail.
<BR>
<BR>
<A NAME="E68E297"></A>
<H3 ALIGN=CENTER>
<CENTER>
<FONT SIZE=5 COLOR="#FF0000"><B>The Browsers Options</B></FONT></CENTER></H3>
<BR>
<P>The Browsers option in the Launcher menu gives you access to different browsers or editors that let you read and manipulate classes, methods, changes, senders, and implementors. The sub-options available are
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?