Platforms to show: All Mac Windows Linux Cross-Platform
NSApplicationMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | Cocoa | MBS MacCocoa Plugin | 11.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
The plugin only implements a small subset of what's available in Cocoa. If you miss something, please send us an email.
You can get an instance of this class using one of three ways:
- app.NSApplicationMBS function
- new NSApplicationMBS
- NSApplicationMBS.sharedInstance
- 18 properties
- property activationPolicy as Integer
- property applicationIconImage as NSImageMBS
- property currentEvent as NSEventMBS
- property currentSystemPresentationOptions as Integer
- property dockTile as NSDockTileMBS
- property Handle as Integer
- property helpMenu as NSMenuMBS
- property isActive as Boolean
- property isFullKeyboardAccessEnabled as Boolean
- property isHidden as Boolean
- property isRunning as Boolean
- property keyWindow as NSWindowMBS
- property mainMenu as NSMenuMBS
- property mainWindow as NSWindowMBS
- property presentationOptions as Integer
- property servicesProvider as NSServiceProviderMBS
- property userInterfaceLayoutDirection as Integer
- property windowsMenu as NSMenuMBS
- shared property WritingToolsAvailable as Boolean New in 25.0
- 47 methods
- method activateIgnoringOtherApps(flag as boolean)
- method addWindowsItem(win as NSWindowMBS, title as string, isFilename as boolean)
- method arrangeInFront
- method cancelUserAttentionRequest(request as Integer)
- method changeWindowsItem(win as NSWindowMBS, title as string, isFilename as boolean)
- method completeStateRestoration
- method Constructor
- method deactivate
- method disableRelaunchOnLogin
- method discardEventsMatchingMask(mask as Integer, beforeEvent as NSEventMBS)
- method enabledRemoteNotificationTypes as Integer
- method enableRelaunchOnLogin
- method extendStateRestoration
- method hide
- method hideOtherApplications
- method invalidateRestorableState
- method miniaturizeAll
- method modalWindow as NSWindowMBS
- method nextEventMatchingMask(mask as Integer, untilDate as date, mode as String, dequeueFlag as boolean) as NSEventMBS
- method nextEventMatchingMask(mask as Integer, untilDate as dateTime, mode as String, dequeueFlag as boolean) as NSEventMBS
- method orderFrontCharacterPalette
- method orderFrontStandardAboutPanel
- method orderFrontStandardAboutPanelWithOptions(options as dictionary)
- method OverlayApplicationIconImage(image as NSImageMBS)
- method postEvent(e as NSEventMBS, atStart as boolean)
- method preventWindowOrdering
- method registerForRemoteNotificationTypes(type as Integer)
- method removeWindowsItem(win as NSWindowMBS)
- method replyToApplicationShouldTerminate(reply as boolean)
- method replyToOpenOrPrint(reply as Integer)
- method requestUserAttention(type as Integer) as Integer
- method runModalForWindow(win as NSWindowMBS) as Integer
- method runPageLayout
- method sendEvent(theEvent as NSEventMBS)
- method showHelp
- method showWritingTools New in 25.0
- method startDictation
- method stopDictation
- method terminate
- method unhide
- method unhideAllApplications
- method unhideWithoutActivation
- method unregisterForRemoteNotifications
- method updateWindows
- method updateWindowsItem(win as NSWindowMBS)
- method windows as NSWindowMBS()
- method windowWithWindowNumber(windowNumber as Integer) as NSWindowMBS
- 20 shared methods
- shared method NSAppKitVersionNumber as Double
- shared method NSApplicationDidBecomeActiveNotification as string
- shared method NSApplicationDidChangeScreenParametersNotification as string
- shared method NSApplicationDidFinishLaunchingNotification as string
- shared method NSApplicationDidFinishRestoringWindowsNotification as string
- shared method NSApplicationDidHideNotification as string
- shared method NSApplicationDidResignActiveNotification as string
- shared method NSApplicationDidUnhideNotification as string
- shared method NSApplicationDidUpdateNotification as string
- shared method NSApplicationLaunchIsDefaultLaunchKey as string
- shared method NSApplicationLaunchRemoteNotificationKey as string
- shared method NSApplicationLaunchUserNotificationKey as string
- shared method NSApplicationWillBecomeActiveNotification as string
- shared method NSApplicationWillFinishLaunchingNotification as string
- shared method NSApplicationWillHideNotification as string
- shared method NSApplicationWillResignActiveNotification as string
- shared method NSApplicationWillTerminateNotification as string
- shared method NSApplicationWillUnhideNotification as string
- shared method NSApplicationWillUpdateNotification as string
- shared method sharedApplication as NSApplicationMBS
- 22 constants
Constants
Constant | Value | Description |
---|---|---|
NSRemoteNotificationTypeAlert | 4 |
One of the notification type constants.
Available in Mac OS X 10.8. |
NSRemoteNotificationTypeBadge | 1 | One of the notification type constants. |
NSRemoteNotificationTypeNone | 0 | One of the notification type constants. |
NSRemoteNotificationTypeSound | 2 |
One of the notification type constants.
Available in Mac OS X 10.8. |
Activation Policy Constants
Constant | Value | Description |
---|---|---|
NSApplicationActivationPolicyAccessory | 1 | The application does not appear in the Dock and does not have a menu bar, but it may be activated programmatically or by clicking on one of its windows. This corresponds to value of the LSUIElement key in the application's Info.plist being 1. more |
NSApplicationActivationPolicyProhibited | 2 | The application does not appear in the Dock and may not create windows or be activated. This corresponds to the value of the LSBackgroundOnly key in the application's Info.plist being 1. This is also the default for unbundled executables that do not have Info.plists. more |
NSApplicationActivationPolicyRegular | 0 | The application is an ordinary app that appears in the Dock and may have a user interface. This is the default for bundled apps, unless overridden in the Info.plist. more |
Presentation Option Constants.
Constant | Value | Description |
---|---|---|
NSApplicationPresentationAutoHideDock | 1 | Example |
NSApplicationPresentationAutoHideMenuBar | 4 | |
NSApplicationPresentationAutoHideToolbar | 2048 | Fullscreen window toolbar is detached from window and hides/shows with autoHidden menuBar. May be used only when both NSApplicationPresentationFullScreen and NSApplicationPresentationAutoHideMenuBar are also set more |
NSApplicationPresentationDefault | 0 | |
NSApplicationPresentationDisableAppleMenu | 16 | |
NSApplicationPresentationDisableForceQuit | 64 | |
NSApplicationPresentationDisableHideApplication | 256 | |
NSApplicationPresentationDisableMenuBarTransparency | 512 | |
NSApplicationPresentationDisableProcessSwitching | 32 | |
NSApplicationPresentationDisableSessionTermination | 128 | |
NSApplicationPresentationFullScreen | 1024 |
Application is in fullscreen mode. Available on Mac OS X 10.7 or newer. |
NSApplicationPresentationHideDock | 2 | |
NSApplicationPresentationHideMenuBar | 8 |
Request type constants.
Constant | Value | Description |
---|---|---|
NSCriticalRequest | 0 |
The user attention request is a critical request. The dock icon will bounce until either the application becomes active or the request is canceled. |
NSInformationalRequest | 10 | The user attention request is an informational request. more |
This class has no sub classes.
Some methods using this class:
- Application.NSApplicationMBS as NSApplicationMBS
- ConsoleApplication.NSApplicationMBS as NSApplicationMBS
- DesktopApplication.NSApplicationMBS as NSApplicationMBS
Some examples using this class:
- /AVFoundation/Recorder
- /AVFoundation/Screen Recorder
- /MacBase/Menus/Cocoa Menu Modification
- /MacCloud/Push Notification/Push Notification
- /MacCocoa/DockMeter/Dock Meter
- /MacControls/Listbox and TableView Demos/ListboxTV drop-in/Flat Only/ListBoxTV Database with DataSource
- /MacControls/Listbox and TableView Demos/ListboxTV drop-in/Flat Only/ListBoxTV Simple Demo with DataSource
- /MacControls/Listbox and TableView Demos/ListboxTV drop-in/Flat Only/ListboxTV with ContainerControl Cells
- /MacControls/Listbox and TableView Demos/ListboxTV drop-in/Hierarchical & Flat/ListBoxTV OutlineView
- /MacOSX/Start Dictation on Mac OS X 10.8
Blog Entries
- Using writing tools in Xojo for Apple Intelligence
- MBS Xojo Plugins, version 24.6pr5
- MBS Xojo Plugins, version 20.5pr1
- MBS Xojo Plugins, version 18.2pr3
- MonkeyBread Software Releases the MBS Xojo Plugins in version 17.5
- MBS Xojo Plugins, version 17.5pr9
- MBS Xojo / Real Studio Plugins, version 16.5pr4
- Working on Mountain Lion Support
- Lion features for Real Studio
- Lion arrived
Xojo Developer Magazine
Release notes
- Version 25.0
- Added showWritingTools method to NSApplicationMBS class.
- Version 20.5
- Changed setappearance, appearance and effectiveAppearance methods in NSAppearanceMBS class to accept application or NSApplicationMBS objects.
- Version 18.2
- Added NSApplicationMBS.runModalForWindow function.
- Version 17.5
- Added NSApplicationMBS.nextEventMatchingMask and related.
The items on this page are in the following plugins: MBS MacCocoa Plugin.
NSApplicationDelegateMBS - NSAttributedStringMBS
