Important: The information in this document is obsolete and should not be used for new development.
OpenTextService
TheOpenTextService
function instructs the Text Services Manager to open a text service component that a user has chosen and to associate it with a TSM document.
FUNCTION OpenTextService (idocID: TSMDocumentID; aComponent: Component; VAR aComponentInstance: ComponentInstance): OSErr;
idocID
- The identification number of a TSM document created by a prior call to the
New
TSMDocument
function (see page 7-50).aComponent
- A component identifier for this text service component.
aComponentInstance
- Upon completion of the call, contains a component instance. This value identifies your application's connection to a text service component. You must supply this value whenever you call the text service functions provided by the component directly.
DESCRIPTION
You can obtain the component identifier to pass inaComponent
by comparing the menu item name selected by the user with the component item names in theTextServiceList
record obtained by callingGetServiceList
.The Text Services Manager opens the requested component by calling the Component Manager
OpenComponent
function.If the specified text service component is already open, the Text Services Manager does not open it again and the
tsmComponentAlreadyOpenErr
error message is returned as a result code. Whether or not the text service is open, the Text Services Manager calls the functionsInitiateTextService
(see page 7-84) andActivateTextService
(see page 7-85) for the given text service and returns a valid component instance. Upon completion of theOpenTextService
call, the selected text service component is initialized and active.
- Note
- This function is for opening text service components other
than input methods. Your application does not need to open or close input methods.RESULT CODES