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


OSAGenericToRealID

You can use the OSAGenericToRealID function to convert a generic script ID to the corresponding component-specific script ID.

FUNCTION OSAGenericToRealID
               (genericScriptingComponent: ComponentInstance;
                VAR theScriptID: OSAID;
                VAR theExactComponent: ComponentInstance)
                : 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).
theScriptID
The generic script ID that you want to convert. The OSAGenericToRealID function returns, in this parameter, the component-specific script ID that corresponds to the generic script ID that you pass in this parameter.
theExactComponent
The OSAGenericToRealID function returns, in this parameter, the component instance that created the script ID returned in the theScriptID parameter.
DESCRIPTION
You can't use the generic scripting component and a generic script ID with component-specific routines. Instead, you can use the component instance and script ID returned by OSAGenericToRealID.

Given a generic script ID (that is, a script ID returned by a call to a standard component routine via the generic scripting component), the OSAGenericToRealID function returns the equivalent component-specific script ID and the component instance that created that script ID. The OSAGenericToRealID function modifies the script ID in place, changing the generic script ID you pass in the theScriptID parameter to the corresponding component-specific script ID.

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