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

MPW Command Reference


Revert

Built-in

SYNTAX

Revert [window1] [window2]… [-y]

DESCRIPTION

The Revert command reverts the specified windows to their previously saved states. Before doing this, Revert displays a confirmation dialog box for each window, asking if you really want to discard your changes. You can use option -y to revert unconditionally to the last saved version of the document.

INPUT

None

OUTPUT

None

ALIAS RESOLUTION

This command resolves Finder aliases that are part of a partial or complete pathname substituted for the window name. The pathname must specify the name of an open window. Note that using a shell variable to designate a window is usually faster than requiring MPW to resolve a Finder alias.

STATUS

Revert can return the following status codes:

0

no errors

1

parameter or option error

2

invalid window

3

system error

4

Cancel button selected

PARAMETERS

window1 [window2]…

Specifies one or more windows. If you do not specify any windows, Revert acts on the target window.

OPTIONS

-y

Unconditionally reverts windows to their previously saved state. In this case Revert does not display a confirmation dialog box.

EXAMPLES

The following command line displays a dialog box and waits for you to click the OK button before reverting the target window to its last saved state:

Revert

Using -y, the following command line unconditionally reverts the worksheet window to its last saved state:

Revert -y "{Worksheet}"

SEE ALSO

Close

Save

 
 


Last Updated July 2000