Platforms to show: All Mac Windows Linux Cross-Platform
Back to NSAlertMBS class.
NSAlertMBS.accessoryView as NSViewMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Cocoa | MBS MacCocoa Plugin | 14.2 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
By default, the accessory view is positioned below the informative text and the suppression button (if any) and above the alert buttons, left-aligned with the informative text. If you want to customize the location of the accessory view, you must first call layout method.
(Read and Write property)
NSAlertMBS.alertStyle as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Cocoa | MBS MacCocoa Plugin | 14.2 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Value can be:
NSWarningAlertStyle | 0 | Warning |
NSInformationalAlertStyle | 1 | Information |
NSCriticalAlertStyle | 2 | Critical Error |
NSAlertMBS.helpAnchor as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Cocoa | MBS MacCocoa Plugin | 14.2 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
(Read and Write property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Cocoa | MBS MacCocoa Plugin | 14.2 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
By default uses the image named NSApplicationIcon.
(Read and Write property)
NSAlertMBS.informativeText as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Cocoa | MBS MacCocoa Plugin | 14.2 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
(Read and Write property)
NSAlertMBS.messageText as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Cocoa | MBS MacCocoa Plugin | 14.2 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
(Read and Write property)
Some examples using this property:
NSAlertMBS.showsHelp as Boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Cocoa | MBS MacCocoa Plugin | 14.2 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
True adds a help button to the alert panel. When the help button is pressed, the delegate is first consulted. If the event does not implement ShowHelp event or returns false, then NSHelpManager.openHelpAnchor is called with a nil book and the anchor specified by HelpAnchor, if any. An exception will be raised if the delegate returns false and there is no help anchor set.
(Read and Write property)
Some examples using this property:
NSAlertMBS.ShowsSuppressionButton as Boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Cocoa | MBS MacCocoa Plugin | 14.2 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
The default is false. This checkbox is typically used to give the user an option to not show this alert again. If shown, the suppression button will have a default localized title similar to @"Do not show this message again". You can customize this title using alert.suppressionButton.Title. When the alert is dismissed, you can get the state of the suppression button, using [[alert suppressionButton] state] and store the result in user defaults, for example. This setting can then be checked before showing the alert again. By default, the suppression button is positioned below the informative text, and above the accessory view (if any) and the alert buttons, and left-aligned with the informative text. However do not count on the placement of this button, since it might be moved if the alert panel user interface is changed in the future. If you need a checkbox for purposes other than suppression text, it is recommended you create your own using an accessory view.
(Read and Write property)
Some examples using this property:
NSAlertMBS.suppressionButton as Variant
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Cocoa | MBS MacCocoa Plugin | 14.2 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
You can also use this method to get the state of the button after the alert is dismissed, which may be stored in user defaults and checked before showing the alert again. In order to show the suppression button in the alert panel, you must set ShowsSuppressionButton to true.
Returns NSButtonMBS object.
(Read only property)
Some examples using this property:
NSAlertMBS.TimedOut as Boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Cocoa | MBS MacCocoa Plugin | 16.2 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
This is set to true when a timeout occurred.
(Read only property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Cocoa | MBS MacCocoa Plugin | 16.2 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Set this to the number of seconds after which the dialog should close.
(Read and Write property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Cocoa | MBS MacCocoa Plugin | 14.2 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
(Read only property)
The items on this page are in the following plugins: MBS MacCocoa Plugin.