SAS/AF software uses a
set of event handler metadata to implement and maintain event handlers.
This metadata exists as a list that is stored with the class. You
can query a class (or an event handler within a class) to view the
event handler metadata. You can also create your own metadata list
to add or change an event handler. For example, to list the metadata
for a particular event handler, execute code similar to the following:
init:
dcl num rc;
dcl list metadata;
dcl object obj;
obj=loadclass('sashelp.classes.listbox_c.class');
rc=obj._getEventHandler('_self_','click',
'_onClick',metadata);
call putlist(metadata,'',3);
return;
The following event
handler metadata is returned:
(SENDER='_self_'
EVENT='visible changed'
DESCRIPTION='Refresh myself'
STATE='N'
METHOD='_refresh'
ENABLED='Yes'
)
The metadata contains
the following named items:
is the current state
of each event handler. Values include Inherited, New, or System, which
are represented by I, N, and S, respectively.
is the name of the
object that generates the event. The default value is _self_. Valid
values are _self_, any object (*), or the name of a component on the
frame.
is the name of the
event that is being handled.
is the name of the
method to execute when the event is sent.
shows whether an event
handler is enabled or disabled. Valid values are Y | N.
System events (State=S)
are always enabled.
is text that describes
the event handler. The maximum length is 256 characters.