space
Previous Page | Next Page

Managing Methods

Overriding Frame Methods to Augment SCL Labeled Sections

The _initLabel, _mainLabel, and _termLabel methods of the Frame class run the corresponding named section in the FRAME entry's SCL code. For example, the _initLabel method runs the INIT section of the FRAME entry. This means that you can override any of these methods and perform preprocessing and postprocessing with respect to the corresponding label. For example, if you want to process some information both before and after the INIT section of a FRAME entry runs, you can override the _initLabel method of the Frame class and write your method similar to this:

USECLASS sasuser.myclasses.newclass.class
 INITLABEL: method;
      /* perform preprocessing */
   /* ...insert additional SCL statements here... */

      /* run the INIT section of the FRAME entry */
   _super();

      /* perform postprocessing */
   /* ...insert additional SCL statements here... */
 endmethod;
ENDUSECLASS;

The _objectLabel method of the Widget class is similar to the section label methods of the Frame class. The _objectLabel method runs an object's labeled section in the FRAME entry's SCL code. For example, if a FRAME entry contains two objects, Textentry1 and Textentry2, the _objectLabel method for Textentry1 runs the section named Textentry1. Overriding this method enables you to perform preprocessing and postprocessing with respect to the corresponding object's label.

When overriding a method, remember that you cannot change its name, scope, or signature.

space
Previous Page | Next Page | Top of Page