![]() |
AEGetTheCurrentEvent |
||||
Header: | AEInteraction.h | Carbon status: | Supported | |
Gets the Apple event that is currently being handled.
OSErr AEGetTheCurrentEvent ( AppleEvent *theAppleEvent );
A pointer to an Apple event. On return, the Apple event that is currently being handled. If no Apple event is currently being handled, AEGetTheCurrentEvent supplies a descriptor record of descriptor type typeNull, which does not contain any data.
A result code.
In many applications, the handling of an Apple event involves one or more long chains of calls to internal functions. The AEGetTheCurrentEvent function makes it unnecessary for these calls to include the current Apple event as a parameter; the functions can simply call AEGetTheCurrentEvent to get the current Apple event when it is needed.
You can also use the AEGetTheCurrentEvent function to make sure that no Apple event is currently being handled. For example, suppose your application always uses an application-defined function to delete a file. That function can first call AEGetTheCurrentEvent and delete the file only if AEGetTheCurrentEvent returns a null descriptor record (that is, only if no Apple event is currently being handled).
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)