Previous Book Contents Book Index Next

Inside Macintosh: Files /
Chapter 3 - Standard File Package / Standard File Package Reference
Standard File Package Routines / Saving Files


Use the SFPutFile procedure to display the standard Save dialog box when the user is saving a file.

PROCEDURE SFPutFile (where: Point; prompt: Str255;
                     origName: Str255; dlgHook: DlgHookProcPtr;
                     VAR reply: SFReply);
The upper-left corner of the dialog box, in global coordinates.
The prompt message to be displayed over the text field.
The initial name of the file.
A pointer to your dialog hook function, which handles item selections received from the Dialog Manager. Specify a value of NIL if you want
the standard items handled in the standard ways. See "Writing a Dialog Hook Function" on page 3-21 for a description of the dialog
hook function.
The reply record, which SFPutFile fills in before returning.
The SFPutFile procedure presents a dialog box through which the user specifies the name and location of a file to be written to. During the dialog, SFPutFile 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 SFPutFile procedure returns the user's input in a record of type SFReply.

The trap macro and routine selector for SFPutFile are
Trap macroSelector

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

Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996