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


GetDefaultInputMethod

The GetDefaultInputMethod function returns the default (input method) text service component for a given script and language.

FUNCTION GetDefaultInputMethod (VAR ts: Component; 
                              VAR slRecord: ScriptLanguageRecord): 
                              OSErr;
ts
The component identifier of the input method text service component that is associated with the script and language combination given in the slRecord parameter.
slRecord
A script-language record that describes the script and language combination that is associated with the input method text service specified in the ts parameter.
DESCRIPTION
The operating system uses GetDefaultInputMethod to find out which input method to activate when the user selects a new keyboard script from the Keyboard menu or by Command-key combination, or when an application calls KeyScript to change keyboard scripts.

In versions of Japanese system software starting with KanjiTalk 7.0, if the default input method is an old (pre-KanjiTalk 7.0) non-TSM-aware method, GetDefaultInputMethod returns the error tsmInputMethodIsOldErr. In that case the ts parameter contains the script code of the old input method in its high-order word, and the reference ID of the old input method in its low-order word.

RESULT CODES
noErrNo error
paramErrThe script does not match the language
tsmScriptHasNoIMErrThe script does not use input methods
tsmInputMethodIsOldErrThe default input method is old-style

Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996