Previous Book Contents Book Index Next

Inside Macintosh: Files /
Chapter 1 - Introduction to File Management / File Management Reference
File Specification Routines /


You can use the StandardPutFile procedure to display the default Save dialog box when the user is saving a file.

PROCEDURE StandardPutFile (prompt: Str255; defaultName: Str255;
                           VAR reply: StandardFileReply);
The prompt message to be displayed over the text field.

The initial name of the file.
The reply record, which StandardPutFile fills in before returning.
The StandardPutFile procedure presents a dialog box through which the user specifies the name and location of a file to be written to. The dialog box is centered on the screen. While the dialog box is active, StandardPutFile gets and handles events until the user completes the interaction, either by selecting a name and authorizing the save or by canceling the save. The StandardPutFile procedure returns the user's input in a record of type StandardFileReply.

The StandardPutFile procedure is not available in all versions of system software. Use the Gestalt function to determine whether StandardPutFile is available before calling it.

Because StandardPutFile may move memory, you should not call it at interrupt time.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996