Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

Platforms to show: All Mac Windows Linux Cross-Platform

Previous items

NSApplicationMBS.runPageLayout
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacCocoa Plugin 12.4 Yes No No Yes, macOS only No
Function: Displays the app's page layout panel, an instance of NSPageLayout.
Example:
NSApplicationMBS.sharedApplication.runPageLayout
Notes: If the NSPageLayout instance does not exist, this method creates one. This method is typically invoked when the user chooses Page Setup from the application's FIle menu.

Feedback, Comments & Corrections

NSApplicationMBS.sendEvent(theEvent as NSEventMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacCocoa Plugin 11.1 Yes No No Yes, macOS only No
Function: Dispatches an event to other objects.
Notes:
You rarely invoke sendEvent directly, although you might want to override this method to perform some action on every event. sendEvent messages are sent from the main event loop (the run method). sendEvent is the method that dispatches events to the appropriate responders—NSApp handles application events, the NSWindow object indicated in the event record handles window-related events, and mouse and key events are forwarded to the appropriate NSWindow object for further dispatching.

If you need to override sendEvent method, please call MBS support.

Feedback, Comments & Corrections

NSApplicationMBS.showHelp
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacCocoa Plugin 16.5 Yes No No Yes, macOS only No
Function: Shows help.
Example:
NSApplicationMBS.sharedApplication.showHelp
Notes: If your project is properly registered, and the necessary keys have been set in the property list, this method launches Help Viewer and displays the first page of your app’s help book.

Feedback, Comments & Corrections

NSApplicationMBS.startDictation
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacCocoa Plugin 13.1 Yes No No Yes, macOS only No
Function: Starts dictation.
Example:
NSApplicationMBS.sharedApplication.startDictation
Notes: For Mac OS X 10.8.

Feedback, Comments & Corrections

NSApplicationMBS.stopDictation
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacCocoa Plugin 13.1 Yes No No Yes, macOS only No
Function: Stops dictation.
Notes: For Mac OS X 10.8.

Feedback, Comments & Corrections

NSApplicationMBS.terminate
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacCocoa Plugin 11.2 Yes No No Yes, macOS only No
Function: Terminates the receiver.
Example:
NSApplicationMBS.sharedApplication.terminate
Notes:
This method is typically invoked when the user chooses Quit or Exit from the application's menu.

When invoked, this method performs several steps to process the termination request. First, it asks the application's document controller (if one exists) to save any unsaved changes in its documents. During this process, the document controller can cancel termination in response to input from the user. If the document controller does not cancel the operation, this method then calls the delegate's applicationShouldTerminate method. If applicationShouldTerminate returns NSTerminateCancel, the termination process is aborted and control is handed back to the main event loop. If the method returns NSTerminateLater, the application runs its run loop in the NSModalPanelRunLoopMode mode until the replyToApplicationShouldTerminate method is called with the value true or false. If the applicationShouldTerminate method returns NSTerminateNow, this method posts a NSApplicationWillTerminateNotification notification to the default notification center.

Do not bother to put final cleanup code in your application's main() function—it will never be executed. If cleanup is necessary, perform that cleanup in the delegate's applicationWillTerminate method.

Feedback, Comments & Corrections

NSApplicationMBS.unhide
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacCocoa Plugin 11.1 Yes No No Yes, macOS only No
Function: Restores hidden windows to the screen and makes the receiver active.
Example:
NSApplicationMBS.sharedApplication.unhide

Feedback, Comments & Corrections

NSApplicationMBS.unhideAllApplications
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacCocoa Plugin 11.1 Yes No No Yes, macOS only No
Function: Unhides all applications, including the receiver.
Example:
NSApplicationMBS.sharedApplication.unhideAllApplications
Notes: This action causes each application to order its windows to the front, which could obscure the currently active window in the active application.

Feedback, Comments & Corrections

NSApplicationMBS.unhideWithoutActivation
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacCocoa Plugin 11.2 Yes No No Yes, macOS only No
Function: Restores hidden windows without activating their owner (the receiver).
Example:
NSApplicationMBS.sharedApplication.unhideWithoutActivation
Notes: When this method begins, it posts an NSApplicationWillUnhideNotification to the default notification center. If it completes successfully, it posts an NSApplicationDidUnhideNotification.

Feedback, Comments & Corrections

NSApplicationMBS.updateWindows
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacCocoa Plugin 13.2 Yes No No Yes, macOS only No
Function: Sends an update message to each onscreen window.
Notes:
This method is invoked automatically in the main event loop after each event when running in NSDefaultRunLoopMode or NSModalRunLoopMode. This method is not invoked automatically when running in NSEventTrackingRunLoopMode.

When this method begins, it posts an NSApplicationWillUpdateNotification to the default notification center. When it successfully completes, it posts an NSApplicationDidUpdateNotification.

Feedback, Comments & Corrections

NSApplicationMBS.updateWindowsItem(win as NSWindowMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacCocoa Plugin 11.1 Yes No No Yes, macOS only No
Function: Updates the Window menu item for a given window to reflect the edited status of that window.
Notes:
win: The window whose menu item is to be updated.

You rarely need to invoke this method because it is invoked automatically when the edit status of an NSWindow object is set.

Feedback, Comments & Corrections

NSApplicationMBS.windows as NSWindowMBS()
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacCocoa Plugin 11.2 Yes No No Yes, macOS only No
Function: Returns an array containing the receiver's window objects.
Example:
// show all window titles in message boxes
for each w as NSWindowMBS in NSApplicationMBS.sharedApplication.windows
MsgBox w.Title
next
Notes: Returns an array of NSWindow objects. This array includes both onscreen and offscreen windows.

Feedback, Comments & Corrections

NSApplicationMBS.windowWithWindowNumber(windowNumber as Integer) as NSWindowMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacCocoa Plugin 11.2 Yes No No Yes, macOS only No
Function: Returns the window corresponding to the specified window number.
Example:
dim w as window = window1
w.Title = "This is our test window"

// get a window ID somewhere
dim WindowID as Integer = CGWindowMBS.GetWindowID(w)

// now find back the window
dim n as NSWindowMBS = NSApplicationMBS.sharedApplication.windowWithWindowNumber(windowid)

MsgBox n.Title
Notes:
windowNumber: The unique window number associated with the desired NSWindow object.

Returns the desired window object or nil if the window could not be found.

Feedback, Comments & Corrections

Previous items

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




Links
MBS FileMaker tutorial videos