Progress
ADM 2 Guide
SmartLink Events
For each SmartLink type, the Source object has specific responsibilities to the Target object, and the Target object has specific responsibilities to the Source object. These responsibilities are fulfilled by the methods contained in the SmartObject; therefore, the type of links that a particular SmartObject can support is determined by the methods that it contains.
The specific responsibilities of a pair of linked SmartObjects to each other depend only on the type of SmartLink that connects them, not on their object types. For example, in a TableIO relationship, the Target object always has the same responsibilities regardless of whether it is a SmartDataBrowser or a SmartDataViewer. Specifically:
- A Source object PUBLISHes named events to which its Target object must SUBSCRIBE and for which the Target object must implement event procedures that execute when PUBLISHED events occur.
- The Target object PUBLISHes named events to which its Source object must SUBSCRIBE and for which the Source object must implement event procedures that execute when PUBLISHED events occur.
Therefore, the Source and Target objects must SUBSCRIBE to the correct set of events or they cannot interact as expected. These events evaluate to the internal procedures in the Source and Target objects.
Subscription occurs when you add the SmartLink: the addLink procedure (in
smart.p
) SUBSCRIBEs the Target procedure to the SourceEvents for the link and SUBSCRIBEs the Source procedure to the TargetEvents, as shown in the following code fragment:
Note that this behavior happens automatically, in the addLink procedure.
See the Progress Programming Handbook or the Progress Language Reference for more information on PUBLISH and SUBSCRIBE. For a description of dynamic–function, see the Progress Language Reference.
The following sections describe the responsibilities of the Source and Target SmartObjects for each ADM-recognized SmartLink type. These sections also list, for each SmartLink type, the subscribed events/internal procedures required by the Source and Target objects.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |