Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Interapplication Communication /
Chapter 4 - Responding to Apple Events / Reference to Responding to Apple Events
Routines for Responding to Apple Events / Creating and Managing the Apple Event Dispatch Tables


AERemoveEventHandler

You can use the AERemoveEventHandler function to remove an entry from an Apple event dispatch table.

FUNCTION AERemoveEventHandler (theAEEventClass: AEEventClass; 
                               theAEEventID: AEEventID; 
                               handler: EventHandlerProcPtr; 
                               isSysHandler: Boolean): OSErr;
theAEEventClass
The event class for the handler whose entry you want to remove from the dispatch table.
theAEEventID
The event ID for the handler whose entry you want to remove from the Apple event dispatch table.
handler
A pointer to the handler to be removed. Although the parameters theAEEventClass and theAEEventID would be sufficient to identify the handler to be removed, providing the handler parameter is a recommended safeguard that ensures that you remove the correct handler. If the value of this parameter is NIL, the Apple Event Manager relies solely on the event class and event ID to identify the handler to be removed.
isSysHandler

Specifies the dispatch table from which to remove the handler. If the value of isSysHandler is TRUE, AERemoveEventHandler removes the handler from the system dispatch table. If the value is FALSE, AERemoveEventHandler removes the handler from your application's dispatch table.
DESCRIPTION
The AERemoveEventHandler function removes the Apple event dispatch table entry you specify in the parameters theAEEventClass, theAEEventID, and handler. You can use the typeWildCard constant for the theAEEventClass or the theAEEventID parameter, or for both parameters; however, AERemoveEventHandler returns an error unless an entry exists that specifies typeWildCard in exactly the same way. For example, if you specify typeWildCard in both the theAEEventClass parameter and the theAEEventID parameter, the Apple Event Manager will not remove the first handler for any event class and event ID in the dispatch table; instead, the dispatch table must contain an entry that specifies type typeWildCard for both the event class and the event ID.

RESULT CODES
noErr0No error
errAEHandlerNotFound-1717No handler found for an Apple event
SEE ALSO
For an explanation of wildcard values, see the description of the AEInstallEventHandler function on page 4-62.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996