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
Generic Scripting Component Routines / Using Component-Specific Routines


OSAGetScriptingComponentFromStored

You can use the OSAGetScriptingComponentFromStored routine to get the subtype code for a scripting component that created a storage descriptor record.

FUNCTION OSAGetScriptingComponentFromStored
               (genericScriptingComponent: ComponentInstance;
                scriptData: AEDesc;
                VAR scriptingSubType: ScriptingComponentSelector)
                : OSAError;
genericScriptingComponent
A component instance for the generic scripting component, created by a prior call to the Component Manager function OpenDefaultComponent or OpenComponent (see page 10-4).
scriptData
Either a generic storage descriptor record or a component-specific storage descriptor record.
scriptingSubType
The function returns, in this parameter, a subtype code identifying the scripting component that created the descriptor record specified by the scriptData parameter.
DESCRIPTION
The OSAGetScriptingComponentFromStored function returns, in the scriptingSubType parameter, the subtype code for the scripting component that created the script data specified by the scriptData parameter.

The generic scripting component automatically identifies the appropriate scripting component for you when you use it to call OSALoad. By calling OSAGetScriptingComponentFromStored, you can determine, without loading a script, which scripting component created the script data.

RESULT CODES
noErr0No error
errOSACantOpenComponent-1762Can't connect to scripting component
badComponentInstance$80008001Invalid component instance

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996