Important: The information in this document is obsolete and should not be used for new development.
SFGetFile
Use theSFGetFileprocedure to display the default Open dialog box when the user is opening a file.
PROCEDURE SFGetFile (where: Point; prompt: Str255; fileFilter: FileFilterProcPtr; numTypes: Integer; typeList: SFTypeList; dlgHook: DlgHookProcPtr; VAR reply: SFReply);
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
SFGetFilepasses files of the specified types.numTypes- The number of file types to be displayed. If you specify a
numTypesvalue 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
NILif you want the standard items handled in the standard ways.reply- The reply record, which
SFGetFilefills in before returning.DESCRIPTION
TheSFGetFileprocedure displays a dialog box listing the names of a specific
group of files from which the user can select one to be opened (as during an Open
menu command). During the dialog,SFGetFilegets 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.SFGetFilereturns the user's input in a record of typeSFReply.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector forSFGetFileare
Trap macro Selector _Pack3 $0002 SPECIAL CONSIDERATIONS
BecauseSFGetFilemay move memory, you should not call it at interrupt time.