Carbon


AESetTheCurrentEvent

Header: AEInteraction.h Carbon status: Supported

Specifies a current Apple event to take the place of the one your application has suspended.

OSErr AESetTheCurrentEvent (
    const AppleEvent *theAppleEvent
);
theAppleEvent

A pointer to the Apple event to handle as the current event.

function result

A result code.

DISCUSSION

There is usually no reason for your application to use the AESetTheCurrentEvent function. Instead of calling this function, your application should let the Apple Event Manager set the current Apple event through its standard dispatch mechanism.

If you need to avoid the dispatch mechanism, you must use the AESetTheCurrentEvent function only in the following way:

  1. Your application suspends handling of an Apple event by calling the AESuspendTheCurrentEvent function.
  2. Your application calls the AESetTheCurrentEvent function. This informs the Apple Event Manager that your application is handling the suspended Apple event. In this way, any functions that call the AEGetTheCurrentEvent function can ascertain which event is currently being handled.
  3. When your application finishes handling the Apple event, it calls the AEResumeTheCurrentEvent function with the value kAENoDispatch to tell the Apple Event Manager that the event has been processed and need not be dispatched.

AVAILABILITY

Supported in Carbon. Available in Mac OS 8.1 and later when Carbon 1.0.2 or later is present.


© 2000 Apple Computer, Inc. — (Last Updated 5/8/2000)