![]() |
<< Index >> |
FutureBasic 5 |
NavDialog | function | |
|
NavDialog
( dialogType [ + options ], message, typeList | defaultSaveName, callbackFn, userData )_kNavDialogSheet | requests a sheet dialog attached to a parent window |
_kNavDialogMultiple | allows the user to select multiple files |
_kNavDialogInvisible | allows the user to see and select invisible files |
_kNavDialogSupportPackages | allows the user to see packages |
_kNavDialogOpenPackages | allows the user to open packages (like MacOS X application packages) |
local fn MyGetFileHandler( reply as ^NavReplyRecord, userData as pointer )
dim as FSSpec spec
NavDialog_GetItemFSSpec( #reply, 1, _false, @spec )
// do something with file spec
end fn
NavDialog_GetItemCount | returns the number of items selected by the user. Useful if the program allows multiple file selection with _kNavDialogMultiple |
NavDialog_GetItemFSSpec | returns the FSSpec of a file/folder selected |
NavDialog_GetItemFSRef | returns the FSRef of a file/folder selected |
NavDialog_CopyItemCFURLRef | returns the CFURLRef of a file/folder |
NavDialog_GetSaveFileNameAsPascalString | what it says |
NavDialog_CopySaveFileName | returns the saveFileName as a CFStringRef |
NavDialog_AddUTIPascalString | If used, must be called before NavDialog(). UTIs are Uniform Type Identifiers and are the modern filtering method. UTIs are broader and more powerful than OSTypes (i.e. TEXT PICT etc.). An overview can be found in the Apple docs at "Introduction to Uniform Type Identifiers Overview" (/Reference Library/Guides/Carbon/Data Management/Uniform Type Identifiers Overview). |
NavDialog_SetFilterFn | If used, must be called before NavDialog() and establishes the name of the filter function (i.e. filterFn). A filter function limits which files the user sees. In the NavDialog_demo the filter function uses UTIs to filter. |
NavDialog_UTIConformsTo | May be used in a filter callback. Used to filter by UTIs. The filter checks to see if the UTI of the item passed (first parameter) "conforms" (or is a member of) the UTI group named in the second parameter. If the item is a member, it returns _true (else _false) so it can be included in the list presented to the user. |
Other Functions | Many other features/functions are available for use and can be found in Subs Files.incl but are not documented here. |