Important: The information in this document is obsolete and should not be used for new development.
OSASetResumeDispatchProc
You can use theOSASetResumeDispatchProc
function to set the resume dispatch function called by a scripting component during execution of an AppleScriptcontinue
statement or its equivalent.
FUNCTION OSASetResumeDispatchProc (scriptingComponent: ComponentInstance; resumeDispatchProc: AEHandlerProcPtr; refCon: LongInt): OSAError;
- scriptingComponent
- A component instance created by a prior call to the Component Manager function
OpenDefaultComponent
orOpenComponent
(see page 10-4).resumeDispatchProc
- You can specify one of the following in this parameter:
- a pointer to a resume dispatch function
- the
kOSAUseStandardDispatch
constant, which causes the Apple Event Manager to dispatch the event using standard Apple event dispatching- the
kOSANoDispatch
constant, which tells the Apple Event Manager that the processing of the Apple event is complete and that it does not need to be dispatched
refCon
- A reference constant. Specify
kOSADontUsePhac
in this parameter andkOSAUseStandardDispatch
in theresumeDispatchProc
parameter to request standard Apple event dispatching excluding the special handler dispatch table.DESCRIPTION
TheOSASetResumeDispatchProc
function sets the resume dispatch function that the specified instance of a scripting component calls during execution of an AppleScriptcontinue
statement or its equivalent. The resume dispatch function should dispatch the event to the application's standard handler for that event.If you are using a general handler similar to that in Listing 10-7 on page 10-21 for preliminary processing of Apple events, and 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 specify
kOSAUseStandardDispatch
as the value of theresumeDispatchProc
parameter and the constantkOSADontUsePhac
as the value of therefCon
parameter. This causes the Apple Event Manager to use standard Apple event dispatching except that it bypasses your application's special handler dispatch table and thus won't call your general Apple event handler recursively.RESULT CODES
noErr 0 No error errOSASystemError -1750 General scripting system error badComponentInstance $80008001 Invalid component instance SEE ALSO
For more information about resume dispatch functions, see "Supplying a Resume Dispatch Function" on page 10-21 and the description of a resume dispatch function on page 10-95.