OSAGetDialectInfo
You can use the OSAGetDialectInfo function to get information about a specified dialect provided by a specified scripting component.
OSAGetDialectInfo (scriptingComponent: ComponentInstance;
dialectCode: Integer; selector: OSType;
VAR resultingDialectInfo: AEDesc): OSAError;
scriptingComponent
- A component instance created by a prior call to the Component Manager function
OpenDefaultComponent or OpenComponent (see page 10-4).
dialectCode
- A code for the dialect about which you want information. You can obtain a list of a scripting component's dialect codes by calling
OSAAvailableDialectCodeList.
selector
- A constant that indicates what kind of information you want
OSAGetDialectInfo to return in the result parameter. This constant determines the descriptor type for the descriptor record returned. See the description that follows for a list of the standard constants you can specify in this parameter.
resultingDialectInfo
- A descriptor record containing the requested information. The descriptor record's descriptor type corresponds to the constant specified in the
selector parameter.
DESCRIPTION
After you obtain a list of dialect codes by calling OSAAvailableDialectCodeList, you can pass any of those codes to OSAGetDialectInfo to get information about the corresponding dialect. The descriptor type of the descriptor record returned by OSAGetDialectInfo depends on the constant specified in the selector parameter. All scripting components support the following constants for this parameter:
CONST
keyOSADialectName = 'dnam';{used with descriptor record }
{ of any text type, such as }
{ type typeChar}
keyOSADialectLangCode = 'dlcd';{used with descriptor record }
{ of type typeShortInteger}
keyOSADialectScriptCode = 'dscd';{used with descriptor record }
{ of type typeShortInteger}
Individual scripting components may allow you to specify additional constants.
RESULT CODES
| noErr | 0 | No error |
| errOSASystemError | -1750 | General scripting system error |
| errOSABadSelector | -1754 | Invalid selector |
| errOSANoSuchDialect | -1757 | Invalid dialect code |
| badComponentInstance | $80008001 | Invalid component instance |