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 / Suspending and Resuming Apple Event Handling


AEResumeTheCurrentEvent

You can use the AEResumeTheCurrentEvent function to inform the Apple Event Manager that your application wants to resume the handling of a previously suspended Apple event or that it has completed the handling of the Apple event.

FUNCTION AEResumeTheCurrentEvent 
                           (theAppleEvent, reply: AppleEvent; 
                            dispatcher: EventHandlerProcPtr; 
                            handlerRefcon: LongInt): OSErr;
theAppleEvent
The Apple event to be resumed.
reply
The default reply provided by the Apple Event Manager for the Apple event.
dispatcher
One of the following:
handlerRefcon

If the value of the dispatcher parameter is not kAEUseStandardDispatch, this parameter is the reference constant passed to the handler when the handler is called. If the value of the dispatcher parameter is kAEUseStandardDispatch, the Apple Event Manager ignores the handlerRefcon parameter and instead passes the reference constant stored in the Apple event dispatch table entry for the Apple event. (You may wish to pass the same reference constant that is stored in the Apple event dispatch table. If so, call the AEGetEventHandler function.)
DESCRIPTION
When your application calls the AEResumeTheCurrentEvent function, the Apple Event Manager resumes handling the specified Apple event using the handler specified in the dispatcher parameter, if any. If kAENoDispatch is specified in the dispatcher parameter, AEResumeTheCurrentEvent simply informs the Apple Event Manager that the specified event has been handled.

SPECIAL CONSIDERATIONS
An Apple event handler that suspends an event should not immediately call AEResumeTheCurrentEvent, or else the handler will generate an error. Instead, the handler should return just after suspending the event.

When your application calls AEResumeTheCurrentEvent for an event that was not directly dispatched, the Apple Event Manager disposes of the event and the reply, just as it normally does, after the event handler returns to AEProcessAppleEvent. Make sure all processing involving the event or the reply has been completed before your application calls AEResumeTheCurrentEvent. Do not call AEResumeTheCurrentEvent for an event that was not suspended.

When your application calls AEResumeTheCurrentEvent for an event that was directly dispatched, your application is responsible for disposing of the original event and the reply, since it is acts as both the server and the client.

RESULT CODE
noErr0No error

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996