• Aucun résultat trouvé

FileList Menu

Dans le document TEKTRONIX SMALLTALK (Page 60-63)

An instance of FileList is created and opened by selecting the System Menu command file list.

The FileList opens up with three subviews.

file-name-pattern (top) File-name Subview

(middle) Text Subview

(bottom)

User lntelface Features

Typing text in the top sub view specifies a pattern. This pattern may consist of completely or incompletely specified names that mayor many not exist in the UTek file system.

The sequence of characters in the pattern may contain the wildcard characters <*> or <#>. <*>

matches any number of characters and <#> matches any single character. These wildcard characters can only be used in the file name itself and not in the path name. For example, lusr/lib/smalltalklfilelnl* and lusr/lib/smalltalkifileln/workspaceFileOut.st are acceptable, but lusr/lib/small* Ijunkfile is not acceptable.

When you choose the middle-button command accept in the top sub view, the middle (file-name) subview displays all the names of the files or directories that matched the pattern in the top subview. When you select a name from the middle subview, a comment is displayed in the bottom (text) subview.

If you selected an existing file, the size and last modification date and time are displayed. If you selected a directory, a message states that the selected file is a directory. If a new file name was accepted in the top subview of the FileList, the comment - new file or directory - is displayed.

If the selected name is an existing file, the following menu appears when you press the middle mouse button:

get contents file in spawn copy name

copy file rename remove

get contents This displays the contents of the selected file in the text subview of the FileList browser.

file in This retrieves the entire contents of the selected file, reading and evaluating the text according to the file format for class definitions, methods, and expressions.

A useful set of Small talk applications to "file in" are found in the UTek path lusr/lib/smalltalklfilelnl*. You are invited to browse these and add the ones you like to your image.

spawn This creates a new view that displays the contents of the file. This is similar to the get contents selection, with the difference that the file contents are displayed in a new File Model view. This simplifies cut-and-paste across multiple windows.

copy name This copies the text of the file name into the text editor buffer. Although it is not visible, it is ready to be "pasted" into other text views.

copy file This copies the selected file into a destination and name of your choice. A prompter will appear, allowing you to type in a new file name (and path, if necessary). Finish by pressing <RETURN> or choosing the middle-button command accept. If you type an unacceptable file name, or no file name at all, a confirmer will appear to determine whether you want to try again.

rename This changes the name of the selected file. A prompter will appear with the file name of the selected file. Enter the new file name, press <RETURN>, and the menu of file names will be updated.

remove This deletes the file name from the directory. A confirmer will appear to determine if you really want to remove the selected file. Choose yes to remove the file.

If the selected name is a directory, the choices offered are a little different, as shown below:

list contents spawn copy name

rename remove

list contents This lists the names of files within the directory in the bottom pane.

spawn This opens a new FileList browser on all the files within the selected directory.

The directory name appears in the top (pattern) subview.

copy name This copies the text of the directory name into the text editor buffer. Although it is not visible, it is ready to be "pasted" into other text views.

rename This changes the name of the selected directory. A prompter will appear with the directory name of the selected directory. Enter the new directory name, press

<RETURN >, and the FileList browser will be updated.

remove This removes the directory if it is empty. If it is not, a notifier appears saying that the directory cannot be removed because it is not empty. If this happens, select spawn and then remove the files within the directory.

If a new name is accepted in the top pane of a FileList and that name is selected in the middle pane, the middle button menu is:

copy name rename new file new directory

copy name This copies the text of the new file name into the text editor buffer. Although it is not visible, it is ready to be "pasted" into other text views.

rename This changes the name of the selected file. A prompter will appear with the file name of the selected file. Enter the new file name, press <RETURN>, and the FileList Browser will be updated.

new file

User Interface Features

This creates an empty file with the specified name and replaces the current middle button menu with the normal middle button menu for files (see above). A new file can also be created by putting text in the bottom pane of the FileList browser.

new directory This creates a new directory with the specified name. The middle button menu is switched to the directory menu.

Dans le document TEKTRONIX SMALLTALK (Page 60-63)

Documents relatifs