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 / Creating and Activating TSM Documents


DeactivateTSMDocument

The DeactivateTSMDocument 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
The DeactivateTSMDocument 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
noErrNo error
tsmInvalidDocIDErrDocument is not a valid TSM document
SEE ALSO
For sample code that uses the DeactivateTSMDocument function, see Listing 7-3 on page 7-21.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996