Extensions

This section provides suggestions for extending Taligent Chat to support additional features. These enhancements are simply recommendations, you'll probably have ideas of your own.

Extending the Chat protocol

To create a larger set of Taligent Chat features, you can extend the existing protocol. For example, you might want to query all the current members of the Taligent Chat discussion. You can accomplish this by subclassing the current TChatHandler object to send out a query protocol message. TChatHandler should know how to send, process, return a response, and recognize the response. Call this additional functionality from the human interface actions (similar to the current actions in Taligent Chat).

Providing multiple views

To support multiple views and the minimal Taligent Chat protocol, you need to mix in the MChatView class with your new view class. For example, to make a view with just the read-only discussion window pane, you need to register interest in the new message notification and provide your own handler routine to perform the display messages. Your view should never generate the send actions.

Changing the user interface

With the version of this application that uses the Taligent UI Builder for the CommonPoint application system, you can change the layout of the main document window by adjusting the layout within the UI Builder and saving a new archive. Because the resizing and positioning code is dependent on the relative positions of the subviews, you'll probably want to check the code in TChatView::HandleAllocatedAreaChanged to make sure it still applies.

Making the Taligent Chat discussion persist

To allow the text in the Taligent Chat discussion to persist from one opening of the document to the next, you should include that data as part of your model. To accomplish this, use the model-based classes of the Text editing framework instead of TSimpleTextView.

Implementing Undo

It's possible to support Undo to retract the last message a user sent to a Taligent Chat discussion or the last message received from another member of a Taligent Chat discussion. To support this requires that you manage all messages and implement additional Taligent Chat protocol.

Removing delay on sending

In the current design of this program, posting a message is synchronous--you wait until the message is sent before you can continue interacting with the human interface. You could create a separate thread when you want to send a message and have this thread do the actual sending on its own time. This implementation frees up the main thread for handling user interactions.

Removing delay on receiving

You can choose to delay the amount of time that this program spends processing incoming messages. You accomplish this by placing incoming messages in a thread-safe queue as they are received. A separate thread can process these buffered messages at Taligent Chat's convenience.


[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