Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

NSApplicationMBS.activationPolicy as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa MBS MacCocoa Plugin 11.2 Yes No No Yes, macOS only No
Function: The application's activation policy.
Notes:
Currently, NSApplicationActivationPolicyNone and NSApplicationActivationPolicyAccessory may be changed to NSApplicationActivationPolicyRegular, but other modifications are not supported.

Available in Mac OS X v10.6 and later.
(Read and Write property)

Feedback, Comments & Corrections

NSApplicationMBS.applicationIconImage as NSImageMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa MBS MacCocoa Plugin 11.1 Yes No No Yes, macOS only No
Function: The image used for the receiver's icon.
Example:
dim pic as Picture = LogoMBS(500)
dim mask as new Picture(500, 500, 32)
dim g as Graphics = mask.Graphics

g.ForeColor = &cFFFFFF
g.FillRect 0,0,g.Width, g.Height
g.ForeColor = &c000000
g.FillOval 0,0,g.Width, g.Height

dim n as new NSImageMBS(pic,mask)

NSApplicationMBS.sharedApplication.applicationIconImage = n
Notes:
An image containing the application's icon.

This property can set the icon in the dock application tile. This method scales the image as necessary so that it fits in the dock tile. You can use this method to change your application icon while running. To restore your application's original icon, you pass nil to this method.
(Read and Write property)

Feedback, Comments & Corrections

NSApplicationMBS.currentEvent as NSEventMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa MBS MacCocoa Plugin 11.1 Yes No No Yes, macOS only No
Function: Returns the current event, the last event the receiver retrieved from the event queue.
Notes:
The last event object retrieved by the application.

NSApp receives events and forwards them to the affected NSWindow objects, which then distribute them to the objects in its view hierarchy.

Only for Cocoa applications.
(Read only property)

Feedback, Comments & Corrections

NSApplicationMBS.currentSystemPresentationOptions as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa MBS MacCocoa Plugin 11.2 Yes No No Yes, macOS only No
Function: Returns the set of application presentation options that are currently in effect for the system.
Example:
dim a as new NSApplicationMBS

MsgBox "currentSystemPresentationOptions: "+str(a.currentSystemPresentationOptions)
Notes:
The presentation options. See NSApplicationPresentation* constants and combine them using a C bitwise OR operator.

These are the presentation options that have been put into effect by the currently active application.
(Read only property)

Feedback, Comments & Corrections

NSApplicationMBS.dockTile as NSDockTileMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa MBS MacCocoa Plugin 11.1 Yes No No Yes, macOS only No
Function: Returns the application's Dock tile.
Example:
dim a as new NSApplicationMBS

a.dockTile.badgeLabel = "Hello"
Notes:
Available in Mac OS X v10.5 and later.
(Read only property)

Feedback, Comments & Corrections

NSApplicationMBS.Handle as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa MBS MacCocoa Plugin 11.1 Yes No No Yes, macOS only No
Function: The internal reference to the NSApplication object.
Notes: (Read and Write property)

Feedback, Comments & Corrections

NSApplicationMBS.helpMenu as NSMenuMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa MBS MacCocoa Plugin 11.1 Yes No No Yes, macOS only No
Function: The help menu used by the application.
Notes:
If helpMenu is nil, the system will append the help to an appropriate menu and will not return a reference to that menu when this method is called.

Available in Mac OS X v10.6 and later.

If helpMenu is a non-nil menu it is set as the Help menu, and Spotlight for Help will be installed in it. If helpMenu is nil, AppKit will install Spotlight for Help into a menu of its choosing, and that menu is not returned from helpMenu.

If you wish to completely suppress Spotlight for Help, you can set a menu that does not appear in the menu bar.

NSApplication retains its Help menu and releases it when a different menu is set.
(Read and Write property)

Feedback, Comments & Corrections

NSApplicationMBS.isActive as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa MBS MacCocoa Plugin 11.1 Yes No No Yes, macOS only No
Function: Returns a Boolean value indicating whether this is the active application.
Example:
dim a as NSApplicationMBS = NSApplicationMBS.sharedApplication
MsgBox "isActive:" +str(a.isActive)
Notes:
True if this is the active application; false otherwise.
(Read only property)

Feedback, Comments & Corrections

NSApplicationMBS.isFullKeyboardAccessEnabled as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa MBS MacCocoa Plugin 11.1 Yes No No Yes, macOS only No
Function: Returns that status of Full Keyboard Access set in the Keyboard preference pane.
Example:
dim a as NSApplicationMBS = NSApplicationMBS.sharedApplication
MsgBox "isFullKeyboardAccessEnabled:" +str(a.isFullKeyboardAccessEnabled)
Notes:
True if Full Keyboard Access is enabled, otherwise false.

You may use this status to implement your own key loop or to implement in-control tabbing behavior similar to NSTableView.

Available in Mac OS X v10.6 and later.
(Read only property)

Feedback, Comments & Corrections

NSApplicationMBS.isHidden as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa MBS MacCocoa Plugin 11.1 Yes No No Yes, macOS only No
Function: Returns a Boolean value indicating whether the receiver is hidden.
Example:
MsgBox str(NSApplicationMBS.sharedApplication.isHidden)
Notes:
True if the receiver is hidden, false otherwise.
(Read only property)

Feedback, Comments & Corrections

NSApplicationMBS.isRunning as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa MBS MacCocoa Plugin 11.1 Yes No No Yes, macOS only No
Function: Returns a Boolean value indicating whether the main event loop is running.
Example:
MsgBox str(NSApplicationMBS.sharedApplication.isRunning)
Notes:
True if the main event loop is running; false otherwise.
False means the stop: method was invoked.

Should always be true for a Real Studio application.
(Read only property)

Feedback, Comments & Corrections

NSApplicationMBS.keyWindow as NSWindowMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa MBS MacCocoa Plugin 11.1 Yes No No Yes, macOS only No
Function: Returns the window that currently receives keyboard events.
Example:
// title of front window
MsgBox NSApplicationMBS.sharedApplication.keyWindow.Title
Notes:
The window object currently receiving keyboard events or nil if there is no key window.
This method might return nil if the application hasn't finished loading yet or if the receiver is not active.

Does return nil in Carbon applications.
(Read only property)

Feedback, Comments & Corrections

NSApplicationMBS.mainMenu as NSMenuMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa MBS MacCocoa Plugin 11.1 Yes No No Yes, macOS only No
Function: The menu object representing the application's menu bar.
Example:
// shows titles of the menus in a Cocoa app
dim m as NSMenuMBS = NSApplicationMBS.sharedApplication.mainMenu

if m<>nil then
dim c as Integer = m.numberOfItems-1
for i as Integer = 0 to c

MsgBox m.Item(i).Title
next
end if
Notes:
Returns nil on a Carbon application.
(Read and Write property)

Feedback, Comments & Corrections

NSApplicationMBS.mainWindow as NSWindowMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa MBS MacCocoa Plugin 11.1 Yes No No Yes, macOS only No
Function: Returns the main window.
Example:
// shows title in Cocoa, but not in Carbon
MsgBox NSApplicationMBS.sharedApplication.mainWindow.Title
Notes:
The application's main window or nil if there is no main window.
This method might return nil if the application hasn't finished loading, if the receiver is not active, or if the application is hidden.
(Read only property)

Feedback, Comments & Corrections

NSApplicationMBS.presentationOptions as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa MBS MacCocoa Plugin 11.2 Yes No No Yes, macOS only No
Function: The presentation options that should be in effect for the system when this application is active.
Example:
dim a as new NSApplicationMBS

// hide dock
a.presentationOptions = NSApplicationMBS.NSApplicationPresentationAutoHideDock
Notes:
Available in Mac OS X v10.6 and later.

Only certain combinations of "NSApplicationPresentationOptions" flags are supported. When given an invalid combination of option flags this method raises an exception NSInvalidArgumentException exception..

See NSApplicationPresentation* constants.
(Read and Write property)

Feedback, Comments & Corrections

NSApplicationMBS.servicesProvider as NSServiceProviderMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa MBS MacCocoa Plugin 14.2 Yes No No Yes, macOS only No
Function: Registers or queries the service provider.
Notes:
The service provider is an object that performs all services the application provides to other applications. When another application requests a service from the receiver, it sends the service request to aProvider. Service requests can arrive immediately after the service provider is set, so invoke this method only when your application is ready to receive requests.

Please keep an object reference around so the object is not going out of scope too early!
(Read and Write property)

Feedback, Comments & Corrections

NSApplicationMBS.userInterfaceLayoutDirection as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa MBS MacCocoa Plugin 16.3 Yes No No Yes, macOS only No
Function: The layout direction of the user interface.
Notes:
This property contains the general user interface layout flow directions. For a list of possible values, see NSUserInterfaceLayoutDirection.

NSUserInterfaceLayoutDirectionLeftToRight = 0
NSUserInterfaceLayoutDirectionRightToLeft = 1

Available in OS X v10.6 and later.
(Read only property)

Feedback, Comments & Corrections

NSApplicationMBS.windowsMenu as NSMenuMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa MBS MacCocoa Plugin 11.1 Yes No No Yes, macOS only No
Function: The window menu or nil if such a menu does not exist or has not yet been created.
Notes: (Read and Write property)

Feedback, Comments & Corrections

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




Links
MBS Xojo PDF Plugins