AEGetTheCurrentEvent
AEGetTheCurrentEvent Return the Apple Event currently being handled
#include <AppleEvents.h> Apple Event Manager
AppleEvent * theAppleEvent ; the Apple Event to be gotten
returns Error Code; 0 = no error
You can use the AEGetTheCurrentEvent function to get the Apple event that
is currently being handled.
The AEGetTheCurrentEvent function returns the Apple event that is
currently being handled. In many applications, the handling of an
Apple event involves one or more long chains of calls to routines within the
application. The AEGetTheCurrentEvent function makes it unnecessary for
these calls to include the current Apple event as a parameter; the routines 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, if your application
always uses an application- defined routine to delete a file, that routine can
determine whether an Apple event is currently being handled by calling
AEGetTheCurrentEvent, and delete the file only if
AEGetTheCurrentEvent returns a null descriptor record, indicating that
no Apple event is currently being handled.
This function returns the Apple event that is currently being handled in the
parameter theAppleEvent.
Result codes
noErr (0) No error