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

MPW Command Reference


SaveOnClose

Built-in

SYNTAX

SaveOnClose [window] [-a | -d | -n]

DESCRIPTION

The SaveOnClose command sets MPW's window-saving behavior. Using the command's options, you can tell MPW to always or never save the contents of the specified window upon closing.

The status of SaveOnClose is shown by the icons below, which appear in the upper-right corner of the window. The icon on the left means "never save on close" and the one on the right means "always save on close."

SaveOnClose status icons

Note that this command works only temporarily; its effect does not persist beyond the closing of the window.

INPUT

None

OUTPUT

If you do not specify any options, the status of the named window is displayed in the form of a SaveOnClose command.

ALIAS RESOLUTION

This command resolves Finder aliases that are part of a partial or complete pathname substituted for the window name. The resolved 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

SaveOnClose can return the following status codes:

0

no errors

1

syntax error

2

invalid window

PARAMETERS

window

Names the window. If you do not specify a window, SaveOnClose saves the target window.

OPTIONS

-a

Always saves the contents of the window before closing.

-d

Displays a dialog box asking whether you would like to save the contents of the window before closing (the default).

-n

Never saves the contents of the window before closing.

Note
You may still save the window by choosing the Save or Save As menu items. •

EXAMPLES

If you know you are going to be dumping unnecessary or harmful output into a window, specify -n so that this information does not get saved. The following command line tells MPW not to save the target window on closure:

SaveOnClose -n

 
 


Last Updated July 2000