Platforms to show: All Mac Windows Linux Cross-Platform
Back to NSSavePanelMBS class.
NSSavePanelMBS.compareFilename(name1 as string, name2 as string, caseSensitive as boolean) as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Navigation | MBS MacCocoa Plugin | 7.8 | ✅ Yes | ❌ No | ❌ No | ❌ No |
If this event has no code, the default behavior is used.
The caseSensitive argument, if true, indicates that the ordering is to be case-sensitive.
Don't reorder filenames in the Save panel without good reason, because it may confuse the user to have files in one Save panel or Open panel ordered differently than those in other such panels or in the Finder. The default behavior of Save and Open panels is to order files as they appear in the Finder. Note also that by implementing this method you will reduce the operating performance of the panel.
Constants:
const NSOrderedAscending=-1 // The left operand is smaller than the right operand.
const NSOrderedSame=0 // The two operands are equal.
const NSOrderedDescending=1 // The left operand is greater than the right operand.
NSSavePanelMBS.directoryDidChange(path as string, folder as folderitem)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Navigation | MBS MacCocoa Plugin | 7.8 | ✅ Yes | ❌ No | ❌ No | ❌ No |
If this event has no code, the default behavior is used.
Some examples using this event:
NSSavePanelMBS.isValidFilename(path as string, item as folderitem) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Navigation | MBS MacCocoa Plugin | 7.8 | ✅ Yes | ❌ No | ❌ No | ❌ No |
If this event has no code, the default behavior is used.
The NSSavePanel object sender sends this event just before the end of a modal session for each filename displayed or selected (including filenames in multiple selections). The event determines whether it wants the file identified by filename; it returns true if the filename is valid, or false if the save panel should stay in its modal loop and wait for the user to type in or select a different filename or names. If the event refuses a filename in a multiple selection, none of the filenames in the selection is accepted.
Some examples using this event:
NSSavePanelMBS.panelSelectionDidChange
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Navigation | MBS MacCocoa Plugin | 7.8 | ✅ Yes | ❌ No | ❌ No | ❌ No |
If this event has no code, the default behavior is used.
Some examples using this event:
NSSavePanelMBS.savePanelDidEnd(ReturnCode as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Navigation | MBS MacCocoa Plugin | 7.8 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Returncode is NSOKButton or NSCancelButton.
Some examples using this event:
NSSavePanelMBS.shouldShowFilename(path as string, item as folderitem) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Navigation | MBS MacCocoa Plugin | 7.8 | ✅ Yes | ❌ No | ❌ No | ❌ No |
If this event has no code, the default behavior is used.
The NSSavePanel sends this event for each file or directory (filename) it is about to load in the browser. The delegate returns true if filename should be selectable, and false if the save panel should disable the file or directory.
Some examples using this event:
NSSavePanelMBS.userEnteredFilename(filename as string, confirmed as boolean) as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Navigation | MBS MacCocoa Plugin | 7.8 | ✅ Yes | ❌ No | ❌ No | ❌ No |
You can either leave the filename alone, return a new filename, or return "" to cancel the save (and leave the Save panel as is). This method is sent before any required extension is appended to the filename and before the Save panel asks the user whether to replace an existing file.
Note that in the future, this method may be called multiple times in the sessions as the user types. In those cases, okFlag will be false until the user confirms the choice, in which case okFlag will become true. If the delegate does extensive validation or puts up alerts, it should do so only when okFlag is true.
If this event has no code, the default behavior is used.
NSSavePanelMBS.willExpand(expanding as boolean)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Navigation | MBS MacCocoa Plugin | 7.8 | ✅ Yes | ❌ No | ❌ No | ❌ No |
If this event has no code, the default behavior is used.
Some examples using this event:
The items on this page are in the following plugins: MBS MacCocoa Plugin.