Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

NSApplicationDelegateMBS class

Type Topic Plugin Version macOS Windows Linux Console & Web iOS
class Cocoa MBS MacCocoa Plugin 11.2 Yes No No Yes, macOS only No
Function: The class for an Cocoa application delegate.
Notes:
Please install in app Constructor. App.Open may be too late.

Using this class you can get application related events before (!) the app class gets it. And of course more events than just the onces the app class have.

Only for Cocoa desktop targets.

In general the plugin calls first the event. Depending on the result it may pass the event to the Real Studio application delegate. If you have no code in the plugin event, everything just passes through and you should not see a difference.

The plugin application delegate is installed with the Constructor and uninstalled in the Destructor.

The original delegate from Real Studio is preserved and all messages are forwarded to it. Also when this object is destroyed, the old delegate is restored.

Feedback, Comments & Corrections

Print Reply Constants

Constant Value Description
NSPrintingCancelled 0 Printing was cancelled.
NSPrintingFailure 3 Printing failed.
NSPrintingReplyLater 2 The result of printing cannot be returned immediately, for example, if printing will cause the presentation of a sheet. If your method returns NSPrintingReplyLater it must always invoke replyToOpenOrPrint when the entire print operation has been completed, successfully or not.
NSPrintingSuccess 1 Printing was successful.

Terminate Reply Constants

Constant Value Description
NSTerminateCancel 0 The application should not be terminated.
NSTerminateLater 2 It may be OK to proceed with termination later. Returning this value causes Cocoa to run the run loop in the NSModalPanelRunLoopMode until your application subsequently calls replyToApplicationShouldTerminate with the value true or false. This return value is for delegates that need to provide document modal alerts (sheets) in order to decide whether to quit.
NSTerminateNow 1 It is OK to proceed with termination.

This class has no sub classes.

Some examples which use this class:

Blog Entries


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


NSAppleScriptMBS   -   NSApplicationMBS




Links
MBS FileMaker tutorial videos