Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

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


SFPGetFile

Call the SFPGetFile procedure when your application requires more control over the Open dialog box than is possible using SFGetFile.

PROCEDURE SFPGetFile (where: Point; prompt: Str255;
                        fileFilter: FileFilterProcPtr;
                        numTypes: Integer; typeList: SFTypeList;
                        dlgHook: DlgHookProcPtr;
                        VAR reply: SFReply; dlgID: Integer;
                        filterProc: ModalFilterProcPtr);
where
The upper-left corner of the dialog box, in global coordinates.
prompt
Ignored.
fileFilter
A pointer to an optional file filter function, provided by your application, through which SFPGetFile passes files of the specified types.
numTypes
The number of file types to be displayed. If you specify a numTypes value of -1, the first filtering passes files of all types.
typeList
A list of file types to be displayed.
dlgHook
A pointer to your dialog hook function, which handles item selections received from the Dialog Manager. Specify a value of NIL if you have not added any items to the dialog box and want the standard items handled in the standard ways.
reply
The reply record, which SFPGetFile fills in before returning.
dlgID
The resource ID of a customized dialog template.
filterProc
A pointer to your modal-dialog filter function, which determines how
the ModalDialog procedure filters events when called by the SFPGetFile procedure. Specify a value of NIL if you are not supplying your own function.
DESCRIPTION
The SFPGetFile procedure is an alternative to SFGetFile when you want to display
a customized Open dialog box or handle the default dialog box in a customized way. During the dialog, SFPGetFile gets and handles events (possibly with the assistance of application-defined callback routines) until the user completes the interaction, either by selecting a file to open or by canceling the open operation. SFPGetFile returns the user's input in a record of type SFReply.

ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for SFPGetFile are
Trap macroSelector
_Pack3$0004

SPECIAL CONSIDERATIONS
Because SFPGetFile may move memory, you should not call it at interrupt time.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996