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: Text /
Chapter 7 - Text Services Manager / Text Services Manager Reference
Text Services Manager Routines for Client Applications / Associating Scripts and Languages With Components


SetDefaultInputMethod

The operating system uses the SetDefaultInputMethod function to assign a default (input method) text service component to a given script and language.

FUNCTION SetDefaultInputMethod (ts: Component; 
                              VAR slRecord: ScriptLanguageRecord): 
                              OSErr;
ts
The component identifier of the input method text service component to be associated with the script and language combination given in the slRecord parameter.
slRecord
A script-language record that describes the script and language combination to be associated with the input method text service component specified in the ts parameter.
DESCRIPTION
The operating system uses SetDefaultInputMethod to associate an input method text service component with a given script and language. The operating system calls this function when the user expresses input method preferences through the Keyboard menu, Keyboard control panel, or other device. The associations made with this function are permanent; that is, they persist after restart.

If the script code and language code specified in the script-language record are incompatible, SetDefaultInputMethod returns the error paramErr.

RESULT CODES
noErrNo error
paramErrThe script does not match the language
tsmScriptHasNoIMErrCurrent script does not use input methods
tsmCantOpenComponentErrCannot open default input of current script

Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996