Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSApplicationMBS class.

NSApplicationMBS.NSAppKitVersionNumber as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.1 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
This constant identifies the installed version of the Application Kit framework.
Example
const NSAppKitVersionNumber10_0 = 577
const NSAppKitVersionNumber10_1 = 620
const NSAppKitVersionNumber10_2 = 663
const NSAppKitVersionNumber10_2_3 = 663.6
const NSAppKitVersionNumber10_3 = 743
const NSAppKitVersionNumber10_3_2 = 743.14
const NSAppKitVersionNumber10_3_3 = 743.2
const NSAppKitVersionNumber10_3_5 = 743.24
const NSAppKitVersionNumber10_3_7 = 743.33
const NSAppKitVersionNumber10_3_9 = 743.36
const NSAppKitVersionNumber10_4 = 824
const NSAppKitVersionNumber10_4_1 = 824.1
const NSAppKitVersionNumber10_4_3 = 824.23
const NSAppKitVersionNumber10_4_4 = 824.33
const NSAppKitVersionNumber10_4_7 = 824.41
const NSAppKitVersionNumber10_5 = 949
const NSAppKitVersionNumber10_5_2 = 949.27
const NSAppKitVersionNumber10_5_3 = 949.33
const NSAppKitVersionNumber10_6 = 1038
const NSAppKitVersionNumber10_7 = 1138
const NSAppKitVersionNumber10_7_2 = 1138.23

if NSApplicationMBS.NSAppKitVersionNumber >= NSAppKitVersionNumber10_5 then
MsgBox "This is Mac OS X 10.5 or newer."
end if

See NSAppKitVersionNumber* constants.

NSApplicationMBS.NSApplicationDidBecomeActiveNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the notification names.

Posted immediately after the application becomes active.
The notification object is sharedApplication. This notification does not contain a userInfo dictionary.

NSApplicationMBS.NSApplicationDidChangeScreenParametersNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the notification names.

Posted when the configuration of the displays attached to the computer is changed.
The configuration change can be made either programmatically or when the user changes settings in the Displays control panel. The notification object is sharedApplication. This notification does not contain a userInfo dictionary.

NSApplicationMBS.NSApplicationDidFinishLaunchingNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the notification names.

Posted at the end of the finishLaunching method to indicate that the application has completed launching and is ready to run.
The notification object is sharedApplication. This notification does not contain a userInfo dictionary.

NSApplicationMBS.NSApplicationDidFinishRestoringWindowsNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Posted when the application is finished restoring windows.

The notification is posted when the application is finished restoring windows, that is, when all the completion handlers from restoreWindowWithIdentifier have been called. This is always posted after NSApplicationWillFinishLaunchingNotification, but may be posted before or after NSApplicationDidFinishLaunchingNotification, depending on whether clients copy the completion handlers and invoke them later. If there were no windows to restore, then this notification is still posted at the corresponding point in app launch (between NSApplicationWillFinishLaunchingNotification and NSApplicationDidFinishLaunchingNotification).

The notification object is sharedApplication. This notification does not contain a userInfo dictionary.
Available in OS X v10.7 and later.

NSApplicationMBS.NSApplicationDidHideNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the notification names.

Posted at the end of the hide method to indicate that the application is now hidden.
The notification object is NSApp. This notification does not contain a userInfo dictionary.

NSApplicationMBS.NSApplicationDidResignActiveNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the notification names.

Posted immediately after the application gives up its active status to another application.
The notification object is NSApp. This notification does not contain a userInfo dictionary.

NSApplicationMBS.NSApplicationDidUnhideNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the notification names.

Posted at the end of the unhideWithoutActivation method to indicate that the application is now visible.
The notification object is NSApp. This notification does not contain a userInfo dictionary.

NSApplicationMBS.NSApplicationDidUpdateNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the notification names.

Posted at the end of the updateWindows method to indicate that the application has finished updating its windows.
The notification object is NSApp. This notification does not contain a userInfo dictionary.

NSApplicationMBS.NSApplicationLaunchIsDefaultLaunchKey as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the keys for the userinfo dictionary on didFinishLaunching.

The following key is present in the userInfo of NSApplicationDidFinishLaunchingNotification or in the didFinishLaunching event. Its value is a number containing a bool. It will be false if the app was launched to open or print a file, to perform a Service, if the app had saved state that will be restored, or if the app launch was in some other sense not a "default" launch. Otherwise its value will be true.

Available on Mac OS X 10.7 or newer.

NSApplicationMBS.NSApplicationLaunchRemoteNotificationKey as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the keys for the userinfo dictionary on didFinishLaunching.

User info keys for NSApplicationDidFinishLaunchingNotification.
Available on Mac OS X 10.7 or newer.

Some examples using this method:

NSApplicationMBS.NSApplicationLaunchUserNotificationKey as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 12.3 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the user info keys for NSApplicationDidFinishLaunchingNotification.
Example
Sub applicationDidFinishLaunching(Notification as NSNotificationMBS)
dim userInfo as Dictionary = Notification.userInfo
dim key as string = NSApplicationMBS.NSApplicationLaunchUserNotificationKey
dim UserNotification as NSUserNotificationMBS = userInfo.Lookup(key, nil)

if UserNotification <> nil then
MsgBox UserNotification.identifier+": "+UserNotification.informativeText
end if
End Sub

This key is present in the userInfo of NSApplicationDidFinishLaunchingNotification. It will be present if your application was launched because a user activated a notification in the Notification Center. Its value is an NSUserNotification object.
Available in Mac OS X 10.8.

Some examples using this method:

NSApplicationMBS.NSApplicationWillBecomeActiveNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the notification names.

Posted immediately after the application becomes active.
The notification object is NSApp. This notification does not contain a userInfo dictionary.

NSApplicationMBS.NSApplicationWillFinishLaunchingNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the notification names.

Posted at the start of the finishLaunching method to indicate that the application has completed its initialization process and is about to finish launching.
The notification object is NSApp. This notification does not contain a userInfo dictionary.

NSApplicationMBS.NSApplicationWillHideNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the notification names.

Posted at the start of the hide method to indicate that the application is about to be hidden.
The notification object is NSApp. This notification does not contain a userInfo dictionary.

NSApplicationMBS.NSApplicationWillResignActiveNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the notification names.

Posted immediately before the application gives up its active status to another application.
The notification object is sharedApplication. This notification does not contain a userInfo dictionary.

NSApplicationMBS.NSApplicationWillTerminateNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the notification names.

Posted by the terminate method to indicate that the application will terminate.
Posted only if the delegate method applicationShouldTerminate returns true. The notification object is sharedApplication. This notification does not contain a userInfo dictionary.

NSApplicationMBS.NSApplicationWillUnhideNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the notification names.

Posted at the start of the unhideWithoutActivation method to indicate that the application is about to become visible.
The notification object is sharedApplication. This notification does not contain a userInfo dictionary.

NSApplicationMBS.NSApplicationWillUpdateNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the notification names.

Posted at the start of the updateWindows method to indicate that the application is about to update its windows.
The notification object is sharedApplication. This notification does not contain a userInfo dictionary.

The items on this page are in the following plugins: MBS MacCocoa Plugin.


The biggest plugin in space...