Platforms to show: All Mac Windows Linux Cross-Platform
Back to NSSavePanelMBS class.
NSSavePanelMBS.allowedFileTypes as string()
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Navigation | MBS MacCocoa Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
If the user specifies a file whose type is in the array of allowed types, the user is not presented with another dialog (see allowsOtherFileTypes for details about this dialog) when trying to save. Examples of common file types are "rtf", "tiff", and "ps". File type strings encoding HFS file types are not valid values for this attribute. A nil return value, which is the default, indicates that the user can save to any ASCII file.
Available in Mac OS X v10.3 and later.
NSSavePanelMBS.beginSheetForDirectory(path as folderitem, name 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 |
If targetWindow is nil, the panel will be a modal dialog.
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:
NSSavePanelMBS.beginSheetForDirectory(path as folderitem, name 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 |
If targetWindow is nil, the panel will be a modal dialog.
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:
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Navigation | MBS MacCocoa Plugin | 7.8 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Navigation | MBS MacCocoa Plugin | 7.8 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
NSSavePanelMBS.File as folderitem
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Navigation | MBS MacCocoa Plugin | 7.8 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
May be nil.
NSSavePanelMBS.HideNSNavNodePopUpButton
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Navigation | MBS MacCocoa Plugin | 8.2 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
This is a function using undocumented features from the Apple NSSavePanel class, so there is not guarantee that it will work in future versions.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Navigation | MBS MacCocoa Plugin | 7.8 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
NSSavePanelMBS.runModal as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Navigation | MBS MacCocoa Plugin | 7.8 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Returns NSOKButton or NSCancelButton or -1 on any error.
NSSavePanelMBS.runModalForDirectory(path as folderitem, name 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 |
If path is nil, the previous directory the Save panel was in is used.
See NSCancelButton and NSOkButton constants for return values.
NSSavePanelMBS.setAllowedFileTypes(filetype as string)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Navigation | MBS MacCocoa Plugin | 7.8 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
See also:
Some examples using this method:
NSSavePanelMBS.setAllowedFileTypes(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 |
A file type is an extension to be appended to any selected files that don't already have that extension; "nib" and "rtf" are examples. The items in types should not include the period that begins the extension. File type strings encoding HFS file types are not valid values. Pass an empty array, to allow any file type, which is the default.
See also:
NSSavePanelMBS.setTagNames(tagNames() as string)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Navigation | MBS MacCocoa Plugin | 23.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
When the value of showsTagField is true, use this property to provide an array of strings that represent the initial tag names to display in the panel. If you set the property to nil or an empty array, the panel displays no initial tag names.
NSSavePanelMBS.tagNames as string()
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Navigation | MBS MacCocoa Plugin | 23.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
When the value of showsTagField is true, use this property to provide an array of strings that represent the initial tag names to display in the panel. If you set the property to nil or an empty array, the panel displays no initial tag names.
NSSavePanelMBS.validateVisibleColumns
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Navigation | MBS MacCocoa Plugin | 7.8 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
You might use this method if you want the browser to only allow selection of files with certain extensions based on the selection made in an accessory-view pop-up list. When the user changes the selection, you would invoke this method to revalidate the visible columns.
The items on this page are in the following plugins: MBS MacCocoa Plugin.