Platforms to show: All Mac Windows Linux Cross-Platform
NSAlertMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | Cocoa | MBS MacCocoa Plugin | 14.2 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
- 2 events
- event SheetDidEnd(returnCode as Integer)
- event ShowHelp as boolean
- 12 properties
- property accessoryView as NSViewMBS
- property alertStyle as Integer
- property helpAnchor as String
- property icon as NSImageMBS
- property informativeText as String
- property messageText as String
- property showsHelp as Boolean
- property ShowsSuppressionButton as Boolean
- property suppressionButton as Variant
- property TimedOut as Boolean
- property timeOut as Double
- property window as Variant
- 11 methods
- method addButtonWithTitle(title as string) as Variant
- method beginSheetModalForWindow(win as DesktopWindow)
- method beginSheetModalForWindow(win as NSWindowMBS)
- method beginSheetModalForWindow(win as window)
- method buttons as Variant()
- method close
- method Constructor
- method Destructor
- method layout
- method runModal as Integer
- method SetTextAlignment(value as Integer)
- 2 shared methods
- shared method alertWithError(error as NSErrorMBS) as NSAlertMBS
- shared method alertWithMessageText(MessageText as string, defaultButton as string = "", alternateButton as string = "", otherButton as string = "", informativeText as string = "") as NSAlertMBS
- 6 constants
Return codes
Constant | Value | Description |
---|---|---|
NSAlertFirstButtonReturn | 1000 |
First (rightmost) button |
NSAlertSecondButtonReturn | 1001 |
Second button. |
NSAlertThirdButtonReturn | 1002 |
Third button. |
Alert styles.
Constant | Value | Description |
---|---|---|
NSCriticalAlertStyle | 2 |
Critical Error |
NSInformationalAlertStyle | 1 |
Informational Alert |
NSWarningAlertStyle | 0 |
Warning Alert (Default style) |
This class has no sub classes.
Some examples using this class:
Blog Entries
- MBS Xojo Plugins, version 22.5pr1
- News from the MBS Xojo Plugins Version 22.1
- MonkeyBread Software Releases the MBS Xojo Plugins in version 22.1
- MBS Xojo Plugins, version 22.1pr6
- Text alignment for alerts
- MBS Xojo / Real Studio plug-ins version 16.2
- MBS Xojo / Real Studio Plugins, version 16.2pr2
- MBS Xojo / Real Studio plug-ins in version 14.2
- MBS Xojo / Real Studio Plugins, version 14.2pr1
Xojo Developer Magazine
Release notes
- Version 22.5
- Fixed NSAlertMBS class to clear timeout after runModal, so you can reuse the alert object.
- Version 22.1
- Added SetTextAlignment method to NSAlertMBS class to use left text alignment for dialogs on macOS.
The items on this page are in the following plugins: MBS MacCocoa Plugin.
NSAffineTransformMBS - NSAnimationContextMBS