Please enable JavaScript to view this site.

ESL Documentation

Action Statement

Replace the drawing statements in an object or all the objects in a class.

change [graphics] {OBJECT_NAME|CLASS_NAME} to

[DRAWING_STATEMENT] ...

graphics

Replace the contents of an object and add the new drawing statements, but do not delete, or affect in any way, any of the object's children. Thus, you need not first delete the object's children from any classes to which they belong. If you omit this keyword, ESL deletes the existing drawing statements for the object, deletes all of the object's children, and adds the new drawing statements starting at the object's origin.

OBJECT_NAME

The identifier for an object.

CLASS_NAME

The identifier for a class of objects.

DRAWING_STATEMENT

A drawing statement.

Description

Since a textual region's drawing statements are distinct from graphical drawing statements, do not specify a change statement for a class of objects that includes textual regions as well as graphical objects.

Before you replace the contents of an object, you should first delete its children from any classes to which they belong (using the delete from class action statement), unless you use the graphics keyword.

Note that a clear graphics statement has the same effect as using the clear statement followed by the add to statement.

Example

 

response to Stop_Key

 change Stop_Key to

 ...

 

response to PanelOpts_PB

 change graphics Start_GR in Panel_GR to

 ...

 

# The following example shows how the change action can

# be used in conjunction with patterns.

 

boolean On_BV is false

pattern RaisedKey ...

pattern DepressedKey ...

key StopStart_Key ...

pattern RaisedKey

 

response to StopStart_Key

 if (On_BV) then

         change StopStart_Key to pattern RaisedKey

 else

         change StopStart_Key to pattern DepressedKey

 end if

 

copy not(On_BV) to On_BV

 

# Textual region example

change Report_TR to

move to 1 1

insert file ReportName_SV

See Also

clear Action Statement

delete from class Action Statement