Important: The information in this document is obsolete and should not be used for new development.
OSAMakeContext
You can use theOSAMakeContext
function to get a script ID for a new script context.
FUNCTION OSAMakeContext(scriptingComponent: ComponentInstance; contextName: AEDesc; parentContext: OSAID; VAR resultingContextID: OSAID): OSAError;
scriptingComponent
- A component instance created by a prior call to the Component Manager function
OpenDefaultComponent
orOpenComponent
(see page 10-4).contextName
- Name of new context. Some scripting components may use context names for semantic purposes. If the value of this parameter is
typeNull
,OSAMakeContext
creates an unnamed context.parentContext
- Existing context from which new context inherits bindings. If the value of this parameter is
kOSANullScript
, the new context does not inherit bindings from any other context.resultingContextID
- A script ID for the resulting script context.
DESCRIPTION
TheOSAMakeContext
function creates a new script context that you may pass toOSAExecute
orOSAExecuteEvent
. The new script context inherits the bindings of the script context specified in theparentContext
parameter.SPECIAL CONSIDERATIONS
If you callOSAMakeContext
using an instance of the generic scripting component, the generic scripting component uses the default scripting component to create the new script context.RESULT CODES
SEE ALSO
To compile existing source data into a script context, useOSACompile
as described on page 10-47.