You can create your own frame
or SCL entry to use as an attribute editor. The frame or SCL entry
functions just like other frames or SCL programs, except that you
must include an ENTRY statement with an OPTIONAL= option before the
INIT label. The ENTRY statement can include the following arguments:
is the object identifier
of the current object for entries that are invoked from the Properties window. For entries that are invoked from
the Class Editor, the object identifier is 0.
is the object identifier
of the class that is used to create the current object for entries
that are invoked from the Properties window.
For entries that are invoked from the Class Editor, classID
is the object identifier of the class that
is currently loaded and displayed.
is a two-character
value that contains CE
for entries
invoked from the Class Editor and PW
for entries invoked from the Properties window.
is the object identifier
of the active frame that contains the object for entries that are
invoked from the Properties window. For entries
that are invoked from the Class Editor, frameID
is 0.
is a character variable
(char(32)
) that contains the name of
the selected attribute.
is a character variable
(char(83)
) that contains the type of
the selected attribute, which can be Character
, List
, Numeric
, Object
, or the four-level name of
a specific CLASS entry.
is either a character
or numeric variable that can contain the value of the attribute.
is a character variable
(char(1)
) that can be set to E
if the attribute is editable.
For example, in the
Font Editor that is provided in
SAS/AF software, the complete SCL program for the editor
is:
entry optional=
objectId:object classId:object environment:char(2)
frameId:object attributeName:char(32) attributeType:char(83)
value:char mode:char(1);
INIT:
value=fontlist(”, 'N', 1, 'Select a font.', 'N');
if value ne ' ' then value = scan(value,1,' ');
return;
The program simply calls
the SCL FONTLIST function, but by including the ENTRY statement, you
can wrap that functionality inside an attribute editor.
You can specify just
those arguments that you need to either process information in the
editor or to return to the Class Editor or the
Properties window. For example, you would include the
environment
parameter in the ENTRY statement if you needed to determine whether
the entry was called when a user was modifying an attribute in the
Class Editor or the
Properties window.