|Type||Topic||Plugin||Version||macOS||Windows||Linux||Console & Web||iOS|
|class||Apple Script||MBS MacCocoa Plugin||12.5||Yes||No||No||Yes, macOS only||No|
Provides a mechanism for registering handler routines for specific types of Apple events and dispatching events to those handlers.
Cocoa provides built-in scriptability support that uses scriptability information supplied by an application to automatically convert Apple events into script command objects that perform the desired operation. However, some applications may want to perform more basic Apple event handling, in which an application registers handlers for the Apple events it can process, then calls on the Apple Event Manager to dispatch received Apple events to the appropriate handler. NSAppleEventManager supports these mechanisms by providing methods to register and remove handlers and to dispatch Apple events to the appropriate handler, if one exists. For related information, see How Cocoa Applications Handle Apple Events (on Apple Developer Website).
For information about the Apple Event Manager, see Apple Event Manager Reference and Apple Events Programming Guide (on Apple Developer Website).
- property Handle as Integer
- 10 methods
- method appleEventForSuspensionID(id as NSAppleEventManagerSuspensionIDMBS) as NSAppleEventDescriptorMBS
- method Constructor
- method currentAppleEvent as NSAppleEventDescriptorMBS
- method currentReplyAppleEvent as NSAppleEventDescriptorMBS
- method removeEventHandlerForEventClass(eventClass as string, eventID as string)
- method replyAppleEventForSuspensionID(id as NSAppleEventManagerSuspensionIDMBS) as NSAppleEventDescriptorMBS
- method resumeWithSuspensionID(id as NSAppleEventManagerSuspensionIDMBS)
- method setCurrentAppleEventAndReplyEventWithSuspensionID(id as NSAppleEventManagerSuspensionIDMBS)
- method setEventHandler(handler as NSAppleEventHandlerMBS, eventClass as string, eventID as string)
- method suspendCurrentAppleEvent as NSAppleEventManagerSuspensionIDMBS
- shared method NSAppleEventManagerWillProcessFirstEventNotification as string
This class has no sub classes.
Some examples which use this class:
The items on this page are in the following plugins: MBS MacCocoa Plugin.
MBS Xojo tutorial videos