Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSOpenPanelMBS class.

NSOpenPanelMBS.beginForDirectory(path as folderitem, name as string, filetypes() as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Navigation MBS MacCocoa Plugin 7.8 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Presents a modeless Open panel.

path:
Directory whose files the panel displays. When nil, the directory is the same directory used in the previous invocation of the panel; this is probably the best choice for most situations.

name:
Specifies a particular file in absoluteDirectoryPath that is selected when the Open panel is presented to the user. When nil, no file is initially selected.

fileTypes:
Array of file extensions and/or HFS file types. Specifies the files the panel allows the user to select. An empty array makes all files in path selectable by the user.

This method will later called the savePanelDidEnd event.

NSOpenPanelMBS.beginSheetForDirectory(path as folderitem, name as string, filetypes() as string, targetWindow as DesktopWindow)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Navigation MBS MacCocoa Plugin 22.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Presents a sheet Open panel on a given window.

path:
Directory whose files the panel displays. When nil, the directory is the same directory used in the previous invocation of the panel; this is probably the best choice for most situations.

name:
Specifies a particular file in path that is selected when the Open panel is presented to the user. When "", no file is initially selected.

filetypes:
Array of file extensions and/or HFS file types. Specifies the files the panel allows the user to select. An empty array makes all files in absoluteDirectoryPath selectable by the user.

targetWindow:
Window to open the sheet on.

This method will later called the savePanelDidEnd event.

Seems like on Mac OS X 10.4 the usage of sheets will raise NSExceptions for missing methods in the NSCarbonWindowFrame class.

See also:

NSOpenPanelMBS.beginSheetForDirectory(path as folderitem, name as string, filetypes() as string, targetWindow as window)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Navigation MBS MacCocoa Plugin 7.8 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Presents a sheet Open panel on a given window.

path:
Directory whose files the panel displays. When nil, the directory is the same directory used in the previous invocation of the panel; this is probably the best choice for most situations.

name:
Specifies a particular file in path that is selected when the Open panel is presented to the user. When "", no file is initially selected.

filetypes:
Array of file extensions and/or HFS file types. Specifies the files the panel allows the user to select. An empty array makes all files in absoluteDirectoryPath selectable by the user.

targetWindow:
Window to open the sheet on.

This method will later called the savePanelDidEnd event.

Seems like on Mac OS X 10.4 the usage of sheets will raise NSExceptions for missing methods in the NSCarbonWindowFrame class.

See also:

NSOpenPanelMBS.Constructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Navigation MBS MacCocoa Plugin 7.8 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The constructor which initializes the panel with default values.

NSOpenPanelMBS.Files as FolderItem()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Navigation MBS MacCocoa Plugin 18.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Queries all folderitems.

See also:

NSOpenPanelMBS.Files(index as UInt32) as folderitem

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Navigation MBS MacCocoa Plugin 7.8 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The array of files.

Index is zero based.

See also:

NSOpenPanelMBS.runModalForDirectory(path as folderitem, name as string, filetypes as string) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Navigation MBS MacCocoa Plugin 7.8 ✅ Yes ❌ No ❌ No ❌ No Desktop only
A convenience version of the runModalForDirectory function which passes one filetype instead of an array of file types.

See NSCancelButton and NSOkButton constants for return values.

See also:

NSOpenPanelMBS.runModalForDirectory(path as folderitem, name as string, filetypes() as string) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Navigation MBS MacCocoa Plugin 7.8 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Runs the panel as a modal dialog with the given filetypes.

path is the directory to use as a start point. Pass nil to use the last directory which has been used.

filetypes:
The filetypes you want to allow.

See NSCancelButton and NSOkButton constants for return values.

See also:

NSOpenPanelMBS.runModalForTypes(filetypes as string) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Navigation MBS MacCocoa Plugin 7.8 ✅ Yes ❌ No ❌ No ❌ No Desktop only
A convenience version of the runModalForTypes function which passes one filetype instead of an array of file types.
Example
Dim dlg As New NSOpenPanelMBS
Dim iResult as Integer = dlg.runModalForTypes("jpg")

See NSCancelButton and NSOkButton constants for return values.

See also:

NSOpenPanelMBS.runModalForTypes(filetypes() as string) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Navigation MBS MacCocoa Plugin 7.8 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Runs the panel as a modal dialog with the given filetypes.
Example
Dim dlg As New NSOpenPanelMBS
dim types() as string = array("jpg", "tif")
Dim iResult as Integer = dlg.runModalForTypes(types)

See NSCancelButton and NSOkButton constants for return values.

See also:

NSOpenPanelMBS.URL(index as UInt32) as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Navigation MBS MacCocoa Plugin 9.6 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The array of file URLs.

Index is zero based.

NSOpenPanelMBS.URLs as String()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Navigation MBS MacCocoa Plugin 18.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Queries all URLs.

The items on this page are in the following plugins: MBS MacCocoa Plugin.


The biggest plugin in space...