Important: The information in this document is obsolete and should not be used for new development.
FixTSMDocument
TheFixTSMDocument
function informs the Text Services Manager that input in the active input area of a specified TSM document has been interrupted, and that the text service component must confirm the text and terminate user input.
FUNCTION FixTSMDocument (idocID: TSMDocumentID): OSErr;
idocID
- The identification number of a TSM document created by a prior call to the
NewTSMDocument
function (see page 7-50).DESCRIPTION
Typically, an inline input text service component removes confirmed input from the active input area each time the user presses the Return key, and passes the confirmed text to your application through an Apple event.In certain situations, however, your client application may need to inform the text service component that there has been an interruption in user input for a specific TSM document. In this case you call the
FixTSMDocument
function to give the input method text service component the opportunity to confirm any input in progress.For instance, if the user clicks in the close box of the window in which active input is taking place, call
FixTSMDocument
before you close the window. The text service component will pass you the current contents (both converted and unconverted) of the active input area as confirmed text.For simple activating and deactivating of your application's window, it is not necessary to confirm the text in the active inline area. The input method saves the text and restores it when your window is reactivated.
RESULT CODES
noErr No error tsmInvalidDocIDErr The document is not a valid TSM document tsmDocNotActiveErr The TSM document is not active tsmTSNotOpenErr The default input method is not open SEE ALSO
For sample code that uses theFixTSMDocument
function, see Listing 7-5 on page 7-23.