NSAppleEventManager

NSAppleEventManager Mac OS X 10.0

This class is used to register objects as handlers of raw Apple Events in a Cocoa application. Instances of this class are not only responsible for registering and unregistering handlers, but are also responsible for dispatching events to the appropriate handler object. An application has a single instance of NSAppleEventManager that is shared among its objects; this event manager is obtained using the class method sharedAppleEventManager.

figs/cocn_1304.gif

@interface NSAppleEventManager : NSObject
 // Accessor Methods
   - (void)setEventHandler:(id)handler andSelector:(SEL)handleEventSelector forEventClass:(AEEventClass)eventClass
        andEventID:(AEEventID)eventID;
 // Class Methods
   + (NSAppleEventManager *)sharedAppleEventManager;
 // Instance Methods
   - (OSErr)dispatchRawAppleEvent:(const AppleEvent *)theAppleEvent withRawReply:(AppleEvent *)theReply
        handlerRefCon:(UInt32)handlerRefCon;
   - (void)removeEventHandlerForEventClass:(AEEventClass)eventClass andEventID:(AEEventID)eventID;



    Part II: API Quick Reference
    Chapter 13. Foundation Classes