Tools: MPW
Advanced Search
Apple Developer Connection
Member Login Log In | Not a Member? Support

MPW Command Reference


Browser

Built-in

SYNTAX

Browser

DESCRIPTION

The Browser command opens the MPW Browser window, shown below, from which you can easily navigate source files and marked text.


The list labeled in the figure as "File list" shows all the text files within the specified directory. You can click a filename to see the file's markers. Double-clicking a filename opens that file. All aspects of file and directory selection work the same way as in conventional dialog boxes.

The list labeled in the figure as "Marker list" shows all the markers within the selected file. If you double-click a marker, the MPW Browser opens the file at the location of the marker.

Note
When either the file list or the marker list is active, typing the initial letter or letters of a name selects an item in the same manner as in standard file dialog boxes. •

If you do not know which file a marker is in, you can use the Find field to search all files in the current directory. To do this, enter the marker's name in the field and press Return or Enter to search for the marker that contains this string (even as a proper substring). If the marker appears in more than one file, the Browser selects the first such appearance. If you check the "Open after find" checkbox, the file with the desired marker is automatically opened with the marker item selected.

If the current list is the marker list, the Find Mark button opens the desired file at the designated marker. (The currently selected window item is indicated by a heavy border. You can advance the selection, rotating between the file list, marker list, and the Find field, by pressing Tab.) Otherwise, the Browser begins searching for the text in the Find field. When the Browser finds the marker, this button's label changes to Find Next until the marker is deselected.

The radio buttons labeled "Frontmost window buttons" determine whether the window is opened as the active or the target window.

In addition to executing the Browser command, you can access the MPW Browser window by choosing Browse from the Mark menu.

INPUT

None

OUTPUT

None

STATUS

Browser can return the following status codes:

0

no errors

1

syntax error

2

unable to open window

PARAMETERS

None

OPTIONS

None

EXAMPLES

The following script uses CMarker and DoIt to produce and execute commands that mark the file Count.c at all function definitions. The CMarker command normally writes to standard output, but in this script MPW redirects standard output to the file MarkerFile, opens the file, and highlights and executes its commands as you watch. The script then closes Count.c and invokes the MPW Browser window to allow you to locate sections of code by searching on the newly created markers.

Begin
  CMarker Count.c > MarkerFile
  DoIt MarkerFile
  Close Count.c
  Browser
End

SEE ALSO

CMarker

Mark

 
 


Last Updated July 2000