Important: The information in this document is obsolete and should not be used for new development.
SFGetFile
Use theSFGetFile
procedure 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
SFGetFile
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 want the standard items handled in the standard ways.reply
- The reply record, which
SFGetFile
fills in before returning.DESCRIPTION
TheSFGetFile
procedure 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,SFGetFile
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.SFGetFile
returns the user's input in a record of typeSFReply
.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector forSFGetFile
are
Trap macro Selector _Pack3 $0002 SPECIAL CONSIDERATIONS
BecauseSFGetFile
may move memory, you should not call it at interrupt time.