AM2 Documentation

Chapter 4 Using Activities in ADL


Newcomers to AM2 often find the idea of activity management a difficult concept to master. Once you learn it, however, you will find it one of the most powerful features of the system. In this section we provide a detailed guide to activity management.

Activities in AM2 provide the basic mechanism by which objects handle events generated by user actions in applications. Activities also handle events that occur in AM2 applications due to a timer or arriving network messages. For example, a standard AM2 button object provides a way to notify other objects when the application user presses it. In the terminology of activity management, the button manages the pressed activity. Similarly, events corresponding to an activity trigger that activity.

All objects that manage activities maintain a list of things to do when events trigger those activities. This is, in essence, a list of messages that AM2 sends to objects when the triggering occurs. The ADL programmer can add and delete things from this list.

We discuss the use of activity management in five stages, each described in a separate subsection:

4.1 - Using the Pressed Attribute
4.2 - Using Notification Request Objects
4.3 - Using Other Types of System-defined NRO Classes
4.4 - NROs Derived from System-defined NROs
4.5 - Creating ADL Classes That Manage Activities
4.6 - Creating Customized NROs
4.7 - Using Activities for Notification of Subscriptions

AM2 Documentation - 19 NOV 1996

Generated with Harlequin WebMaker