⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ch36.htm

📁 linux-unix130.linux.and.unix.ebooks130 linux and unix ebookslinuxLearning Linux - Collection of 12 E
💻 HTM
📖 第 1 页 / 共 5 页
字号:


	<TR ALIGN="LEFT" rowspan="1">



		<TD WIDTH="107" ALIGN="LEFT" VALIGN="TOP"><TT>find method here</TT></TD>



		<TD ALIGN="LEFT" VALIGN="TOP">Searches for the method that implements a specified selector</TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD WIDTH="107" ALIGN="LEFT" VALIGN="TOP"><TT>find method</TT></TD>



		<TD ALIGN="LEFT" VALIGN="TOP">Searches in the class hierarchy for the first class implementing the selector you



			specify in the dialog box</TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD WIDTH="107" ALIGN="LEFT" VALIGN="TOP"><TT>new category</TT></TD>



		<TD ALIGN="LEFT" VALIGN="TOP">Enables you to add a new category to the list</TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD WIDTH="107" ALIGN="LEFT" VALIGN="TOP"><TT>copy category</TT></TD>



		<TD ALIGN="LEFT" VALIGN="TOP">Enables you to copy all methods in a class category to the currently selected class</TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD WIDTH="107" ALIGN="LEFT" VALIGN="TOP"><TT>create access methods</TT></TD>



		<TD ALIGN="LEFT" VALIGN="TOP">Creates methods to access instance variables</TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD WIDTH="107" ALIGN="LEFT" VALIGN="TOP"><TT>rename</TT></TD>



		<TD ALIGN="LEFT" VALIGN="TOP">Renames the currently selected method category</TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD WIDTH="107" ALIGN="LEFT" VALIGN="TOP"><TT>remove</TT></TD>



		<TD ALIGN="LEFT" VALIGN="TOP">Removes all methods in the currently selected class that are members of the currently



			selected method category</TD>



	</TR>



</TABLE>







</CENTER>



<P>The method list pop-up menu appears when you press the menu mouse button while



the pointer is in the method list view. The functions available from this menu are



shown in Figure 36.7 and explained in Table 36.5. 







<P>



<A HREF="../art/36/36fig07.gif"><B>Figure 36.7.</B> </a> <I>The method list pop- up menu.



</I><BR>







<CENTER>



<P><FONT SIZE="4"><B>Table 36.5.</B> Method list pop-up menu functions. </FONT>



<TABLE BORDER="1">



	<TR ALIGN="LEFT" rowspan="1">



		<TD WIDTH="100" ALIGN="LEFT"><I>Function</I></TD>



		<TD ALIGN="LEFT"><I>Description</I></TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD WIDTH="100" ALIGN="LEFT" VALIGN="TOP"><TT>fileOut</TT></TD>



		<TD ALIGN="LEFT" VALIGN="TOP">Saves the currently selected method in a file named <TT>className-selector.st</TT></TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD WIDTH="100" ALIGN="LEFT" VALIGN="TOP"><TT>printOut</TT></TD>



		<TD ALIGN="LEFT" VALIGN="TOP">Sends the source code of the currently selected method to the printer</TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD WIDTH="100" ALIGN="LEFT" VALIGN="TOP"><TT>spawn</TT></TD>



		<TD ALIGN="LEFT" VALIGN="TOP">Starts a browser for editing this method</TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD WIDTH="100" ALIGN="LEFT" VALIGN="TOP"><TT>senders</TT></TD>



		<TD ALIGN="LEFT" VALIGN="TOP">Starts a new browser on all methods sending a specific message</TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD WIDTH="100" ALIGN="LEFT" VALIGN="TOP"><TT>implementors</TT></TD>



		<TD ALIGN="LEFT" VALIGN="TOP">Starts a new browser on all methods implementing a specific message</TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD WIDTH="100" ALIGN="LEFT" VALIGN="TOP"><TT>globals</TT></TD>



		<TD ALIGN="LEFT" VALIGN="TOP">Starts a new browser on all methods that are accessing a global that is either a



			global variable or a symbol, as well as all methods sending a corresponding message</TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD WIDTH="100" ALIGN="LEFT" VALIGN="TOP"><TT>local senders</TT></TD>



		<TD ALIGN="LEFT" VALIGN="TOP">Same as <TT>senders</TT> but limits the search to the current class and its subclasses</TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD WIDTH="100" ALIGN="LEFT" VALIGN="TOP"><TT>new method</TT></TD>



		<TD ALIGN="LEFT" VALIGN="TOP">Enables you to create a new method from a template in the code view</TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD WIDTH="100" ALIGN="LEFT" VALIGN="TOP"><TT>change category</TT></TD>



		<TD ALIGN="LEFT" VALIGN="TOP">Enables you to change the category of the selected method</TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD WIDTH="100" ALIGN="LEFT" VALIGN="TOP"><TT>remove</TT></TD>



		<TD ALIGN="LEFT" VALIGN="TOP">Removes the currently selected method</TD>



	</TR>



</TABLE>







</CENTER>



<P>When you add or remove instance variables to or from a system class description



and accept (that is, save the changes), the system creates a new class instead of



changing the old one. The original class still exists to give existing instances



of the class a valid class even though it is no longer accessible by name. After



the change, you can no longer edit the old class.







<DL>



	<DT></DT>



</DL>











<DL>



	<DD>



<HR>



<A NAME="Heading10<FONT COLOR="#000077"><B>NOTE:</B> </FONT>It is recommended



	that you don't change the definition of system classes but only private ones. It



	is safer to use the <TT>copy category</TT> function to copy an existing class and



	its methods to a new class and modify the new class. This is especially important



	for classes which are used by the system itself since changes can lead to problems



	in the operation of the ST/X environment.



<HR>







</DL>







<P>The code view is the lower half of the System Browser. It is here that you can



modify the class or instance definitions as well as methods. The pop-up menu for



this area is the edit menu that appears in every text editing view in ST/X. The functions



in this menu are discussed in the &quot;Editing in Browsers&quot; section of this



chapter.



<CENTER>



<H4><A NAME="Heading11<FONT COLOR="#000077">The Class Hierarchy Browser</FONT></H4>



</CENTER>



<P>When the Class Hierarchy Browser is selected, a dialog box appears which asks



for the name of class. If you enter a valid class, the Class Hierarchy Browser appears



for that class. This is the same as the System Browser except there is no class category



list since this is for one specific class. The pop-up menus for each of the four



subviews are the same as in the System Browser.



<CENTER>



<H4><A NAME="Heading12<FONT COLOR="#000077">Implementors</FONT></H4>



</CENTER>



<P>When the Implementors option is selected, a dialog box appears which asks for



a selector. A selector is the name of the type of operation a message requests of



its receiver.</P>



<P>If you enter a valid selector, an Implementors view will be displayed. This view



is similar to the one shown in Figure 36.8. 







<P>



<A HREF="../art/36/36fig08.gif"><B>Figure 36.8.</B> </A> <I>The Implementors view. <BR>



</I><BR>



The Implementors view contains a list of the methods that implement the method specified



by the selector. The pop-up menu for the top half of the Implementor view is the



same as the pop-up menu for the method list subview which was discussed earlier in



the section &quot;The System Browser.&quot;



<CENTER>



<H4><A NAME="Heading13<FONT COLOR="#000077">Senders</FONT></H4>



</CENTER>



<P>When the Senders option is selected, a dialog box appears that asks for a selector.



If you enter a valid selector, then a Senders view will be displayed. This view is



similar to the one shown in Figure 36.9. 







<P>



<A HREF="../art/36/36fig09.gif"><B>Figure 36.9.</B> </A> <I>Senders view. </I><BR>



<BR>



The Senders view contains a list of the methods that send the selected message. The



pop-up menu for the top half of the Senders view is the same as the pop-up menu for



the method list subview which was discussed in the section &quot;The System Browser.&quot;



<CENTER>



<H4><A NAME="Heading14<FONT COLOR="#000077">The Changes Browser</FONT></H4>



</CENTER>



<P>Each time you make a change to either the class hierarchy or to a method, ST/X



writes a record to a <TT>changes</TT> file. The Changes Browser enables you to inspect



and manipulate the <TT>changes</TT> file. There are two subviews in the Changes Browser;



the change list and the contents view. The change list gives a list of all changes



in chronological order. A sample Changes Browser is shown in Figure 36.10. 







<P>



<A HREF="../art/36/36fig10.gif"><B>Figure 36.10.</B> </A><I> The Changes Browser.</I> <BR>



<BR>











To display a change, select one of the changes from the change list. The change browser



then displays the contents of the change in the contents view.</P>



<P>The pop-up menu for the change list has the functions described in Table 36.6.



<BR>







<CENTER>



<P><FONT SIZE="4"><B>Table 36.6.</B> The Change list pop-up menu. </FONT>



<TABLE BORDER="0">



	<TR ALIGN="LEFT" rowspan="1">



		<TD WIDTH="123" ALIGN="LEFT"><I>Function</I></TD>



		<TD ALIGN="LEFT"><I>Description</I></TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD WIDTH="123" ALIGN="LEFT" VALIGN="TOP"><TT>apply change</TT></TD>



		<TD ALIGN="LEFT" VALIGN="TOP">Applies the currently selected change.</TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD WIDTH="123" ALIGN="LEFT" VALIGN="TOP"><TT>apply to end</TT></TD>



		<TD ALIGN="LEFT" VALIGN="TOP">Applies all the changes from the currently selected change to the end of the changes



			file.</TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD WIDTH="123" ALIGN="LEFT" VALIGN="TOP"><TT>apply all changes</TT></TD>



		<TD ALIGN="LEFT" VALIGN="TOP">Applies all the changes in the file.</TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD WIDTH="123" ALIGN="LEFT" VALIGN="TOP"><TT>delete</TT></TD>



		<TD ALIGN="LEFT" VALIGN="TOP">Deletes the currently selected change from the list.</TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD WIDTH="123" ALIGN="LEFT" VALIGN="TOP"><TT>delete to end</TT></TD>



		<TD ALIGN="LEFT" VALIGN="TOP">Deletes all changes from the currently selected change to the end of the file.</TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD WIDTH="123" ALIGN="LEFT" VALIGN="TOP"><TT>delete changes for</TT></TD>



		<TD ALIGN="LEFT" VALIGN="TOP">Deletes all changes affecting the same class as the currently selected</TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD WIDTH="123" ALIGN="LEFT" VALIGN="TOP"><TT>this class to end</TT></TD>



		<TD ALIGN="LEFT" VALIGN="TOP">change to the end of the changes file.</TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD WIDTH="123" ALIGN="LEFT" VALIGN="TOP"><TT>delete all changes</TT></TD>



		<TD ALIGN="LEFT" VALIGN="TOP">Deletes all changes in the file for the same class as the currently selected change.</TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD WIDTH="123" ALIGN="LEFT" VALIGN="TOP"><TT>update</TT></TD>



		<TD ALIGN="LEFT" VALIGN="TOP">Rereads the changes file.</TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD WIDTH="123" ALIGN="LEFT" VALIGN="TOP"><TT>compress</TT></TD>



		<TD ALIGN="LEFT" VALIGN="TOP">Compresses the change list and removes multiple changes of a method and leaves the



			most recent change compared to current.</TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD WIDTH="123" ALIGN="LEFT" VALIGN="TOP"><TT>version</TT></TD>



		<TD ALIGN="LEFT" VALIGN="TOP">Compares a method's source code in a change with the current version of the method



			and outputs a message in the Transcript view.</TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD WIDTH="123" ALIGN="LEFT" VALIGN="TOP"><TT>make a change patch</TT></TD>



		<TD ALIGN="LEFT" VALIGN="TOP">Appends the change to the end of the patches file which will be run and automatically



			applied at ST/X startup.</TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD WIDTH="123" ALIGN="LEFT" VALIGN="TOP"><TT>update sourcefile from change</TT></TD>



		<TD ALIGN="LEFT" VALIGN="TOP">This function is not currently implemented.</TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD WIDTH="123" ALIGN="LEFT" VALIGN="TOP"><TT>writeback</TT></TD>



		<TD ALIGN="LEFT" VALIGN="TOP">Writes the change list back to the <TT>changefile</TT> changes file. All delete/compress



			operations performed in the Change Browser will not affect the changes file unless



			this operation is performed.</TD>



	</TR>



</TABLE>







</CENTER>



<P>The Change Browser can be used to recover from a system crash by reapplying all



changes that were made after the last snapshot entry.







<DL>



	<DT></DT>



</DL>











<DL>



	<DD>



<HR>



<A NAME="Heading15<FONT COLOR="#000077"><B>NOTE:</B> </FONT>To control the



	size of the changes file, it is a good idea to apply a compress periodically. This



	will remove all old changes for a method leaving the newest one.



<HR>







</DL>







<CENTER>



<H4><A NAME="Heading16<FONT COLOR="#000077">Directory Browser</FONT></H4>



</CENTER>



<P>When you select the Directory Browser option, a browser with five subviews is



displayed. The top half of the browser displays the current directory and all subdirectories



and files contained in it. If you select a directory, it is expanded in the next



⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -