OSAAvailableDialects
You can use the OSAAvailableDialects function to obtain a descriptor list containing information about each of the currently available dialects for a scripting component.
FUNCTION OSAAvailableDialects
(scriptingComponent: ComponentInstance;
VAR resultingDialectInfoList: AEDesc): OSAError;
scriptingComponent
- A component instance created by a prior call to the Component Manager function
OpenDefaultComponent or OpenComponent (see page 10-4).
resultingDialectInfoList
- The returned descriptor list.
DESCRIPTION
Each item in the list returned by OSAAvailableDialects is an AE record of descriptor type typeOSADialectInfo.
CONST typeOSADialectInfo = 'difo';
Each descriptor record in the descriptor list contains, at a minimum, four keyword-specified descriptor records with the following keywords:
CONST
keyOSADialectName = 'dnam';{used with descriptor record }
{ of any text type, such as }
{ type typeChar}
keyOSADialectCode = 'dcod';{used with descriptor record }
{ of type typeShortInteger}
keyOSADialectLangCode = 'dlcd';{used with descriptor record }
{ of type typeShortInteger}
keyOSADialectScriptCode = 'dscd';{used with descriptor record }
{ of type typeShortInteger}
Rather than calling OSAAvailableDialects to obtain complete dialect information for a scripting component, it is usually more convenient to call OSAAvailableDialectCodeList to get a list of codes for a scripting component's dialects, then call OSAGetDialectInfo to get information about the specific dialect you're interested in.
RESULT CODES
| noErr | 0 | No error |
| errOSASystemError | -1750 | General scripting system error |
| badComponentInstance | $80008001 | Invalid component instance |