Using simple notification

This section discusses how to use the standard notification classes to implement simple synchronous notification between instances in the same task. This is the most common use of notification. Later, you will see how to set up more complex types of notification, including:

This section presents an example that uses the standard notification classes TMemberFunctionConnectionTo<AReceiver>, TInterest, TNotification, and TNotifier. Two user classes are presented, TShapeList and TShapeView. TShapeList, the sender, is a collection of graphic shapes, and TShapeView, the receiver, is a view of the shapes in a TShapeList.

In a typical scenario, other classes would be used to trigger the changes in TShapeList. However, these classes and details of the class implementation are omitted in the example because they are not germane to notification.

You can write senders and receivers independently. However, when you write a sender, you have to carefully consider the needs of potential receivers. This is especially important given that the design of the receiver is dependent on the design of the sender.

Figure 1, at the beginning of this document, illustrates the classes described in the following example. You might find it helpful to revisit it.


[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