Model subsystem

The Model subsystem stores and manages the persistent data associated with the document. This data consists of user-specified information including the topic, host name, and user's name. It also includes a boolean indicating whether the current document is joined in a conversation.

This subsystem updates this information when a user changes it, saves it with the model when the user closes the document, and displays it when the user reopens the document and chooses the Join button. This functionality enables a user to easily rejoin the last Taligent Chat discussion that the document was associated with. If the document was closed while joined to a discussion, upon reopening this document, it will attempt to automatically join the discussion specified by the other model information.


TChatModel contains three TStandardText objects to represent the topic, host name, and user name. It provides an interface for getting and setting these values as a group or individually. TChatModel provides streaming operators for saving the document model state.

In addition, TChatModel creates and owns the TChatHandler object that implements the Taligent Chat protocol. The model has accessor functions for getting at the TChatHandler object. Additional information on TChatHandler is provided in the next section, "Protocol Subsystem."

TChangeChatInfoCommand is the only command that affects the model. Taligent Chat creates it as a result of the user clicking the Join button in the main view when she wants to join an existing Taligent Chat discussion. When this occurs, TChangeChatInfoCommand uses the TChatSelection to set the topic, host name, and user name in the model for display in the dialog that users employ to join a Taligent Chat discussion. TChatView notes the user's button click (in the form of an action) and creates and dispatches the command.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker