Important: The information in this document is obsolete and should not be used for new development.
AESuspendTheCurrentEvent
You can use theAESuspendTheCurrentEvent
function to suspend the processing of the Apple event that is currently being handled.
FUNCTION AESuspendTheCurrentEvent (theAppleEvent: AppleEvent): OSErr;
theAppleEvent
- The Apple event whose handling is to be suspended. Although the Apple Event Manager doesn't need this parameter to identify the Apple event currently being handled, providing it is a safeguard that you are suspending the correct Apple event.
DESCRIPTION
After a server application makes a successful call to theAESuspendTheCurrentEvent
function, it is no longer required to return a result or a reply for the Apple event that was being handled. It can, however, return a result if it later calls theAEResumeTheCurrentEvent
function to resume event processing.The Apple Event Manager does not automatically dispose of Apple events that have been suspended or their default replies. (The Apple Event Manager does, however, automatically dispose of a previously suspended Apple event and its default reply if the server later resumes processing of the Apple event by calling the
AEResumeTheCurrentEvent
function.) If your server application does not resume processing of a suspended Apple event, it is responsible for using theAEDisposeDesc
function to dispose of both the Apple event and its default reply when your application has finished using them.SPECIAL CONSIDERATIONS
If your application suspends handling of an Apple event it sends to itself, the Apple Event Manager immediately returns from theAESend
call with the error codeerrAETimeout
, regardless of whether thekAEQueueReply
,kAEWaitReply
, orkAENoReply
flags were set, even if thetimeout
parameter is set tokNoTimeOut
. The routine callingAESend
should take the timeout error as confirmation that the event was sent.As with other calls to
AESend
that return a timeout error, the handler continues to process the event nevertheless. The handler's reply, if any, is provided in the reply event when the handling is completed. The Apple Event Manager provides no notification that the reply is ready. If no data has yet been placed in the reply event, the Apple Event Manager returnserrAEReplyNotArrived
when your application attempts to extract data from the reply.RESULT CODE
noErr 0 No error