Events provide flexible, loosely coupled communication
between objects. The
SAS/AF event model is implemented through global event registration, which means that different components
can listen to and provide handlers for events that are generated by other objects
in the current application, objects in any other
SAS/AF application that is also running, or the SAS session itself.
Events notify applications when a
resource or
state changes. Event handlers manage the corresponding response to any changes. Events
occur when a user action takes place (such as a mouse click), when an
attribute value is changed, or when a user-defined condition occurs.
SAS/AF software supports system events, which can include user
interface events (such as mouse clicks) as well as “attributeName Changed” events that occur
when an attribute value is updated. For system events, the value of the State
metadata item is “S.” For “attributeName Changed” events, the
component must have the SendEvent metadata item for the attribute set to “Yes.” See
Enabling Attribute Linking for details.
SAS/AF software includes a SAS Session component that provides access to changes made within
the SAS environment. For example, SAS
sends a system event when a new
libref has been assigned or when a new
catalog entry has been added. You can create an
instance of the SAS Session component and implement handler methods for the events you want
to process. For complete information on the SAS Session component, refer to the SAS
Session component topic in the
SAS/AF online Help.