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 10 - Scripting Components / Scripting Components Reference
Application-Defined Routines /


MyResumeDispatch

Your application can provide a resume dispatch function that a scripting component calls during script execution to dispatch Apple events directly to an application's default handler for an Apple event. A resume dispatch function takes the same parameters as an Apple event handler.

FUNCTION MyResumeDispatch (theAppleEvent: AppleEvent; 
                           reply: AppleEvent; refCon: LongInt)
                           : OSErr;
theAppleEvent
The Apple event to be dispatched.
reply
The default reply Apple event provided by the Apple Event Manager.
refCon
The reference constant stored in the Apple event dispatch table for the Apple event.
DESCRIPTION
If a script specifies that the Apple event should be passed to an application's standard handler for that event (for example, with an AppleScript continue statement), the scripting component executing the script passes the event to the resume dispatch function currently being used by the scripting component. The resume dispatch function should dispatch the event directly to the application's standard handler for that event. If you use script contexts to handle Apple events, you may need to provide a resume dispatch function.

If you can rely on standard Apple event dispatching to dispatch the event correctly, you don't need to provide a resume dispatch function. Instead, you can use the OSASetResumeDispatchProc routine to specify that the Apple Event Manager should use standard Apple event dispatching instead of a resume dispatch function.

SEE ALSO
For a description of the OSASetResumeDispatchProc function, see page 10-71.

For a discussion of the use of script contexts to handle Apple events, see "Using a Script Context to Handle an Apple Event" on page 10-19.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996