Important: The information in this document is obsolete and should not be used for new development.
DeactivateTSMDocument
TheDeactivateTSMDocument
function instructs the Text Services Manager to mark the TSM document as inactive.
FUNCTION DeactivateTSMDocument (idocID: TSMDocumentID): OSErr;
idocID
- A TSM document identification number created by a prior call to the
NewTSMDocument
function (see page 7-50).DESCRIPTION
TheDeactivateTSMDocument
function lets you inform the Text Services Manager that a TSM document in your client application is no longer active and must temporarily stop using text service components.The Text Services Manager calls the equivalent text service component function
DeactivateTextService
(see page 7-85) for any text service component associated with the TSM document being deactivated.
- IMPORTANT
- Once your application is initialized as a TSM-aware application, at least one TSM document must always be active when your application is active. If a situation arises in which you are a TSM-aware application but all of your TSM documents are inactive, any text service component that has a menu or palette windows will be unable to communicate with the user. The best policy is to always create a TSM document, even if only a dummy document, immediately after initializing as a TSM-aware application.
RESULT CODES
noErr No error tsmInvalidDocIDErr Document is not a valid TSM document SEE ALSO
For sample code that uses theDeactivateTSMDocument
function, see Listing 7-3 on page 7-21.