Chapter Contents

Previous

Next
Object Class: _setInstanceMethod

Object Class: _setInstanceMethod



Adds or changes a per-instance method of a class or object


Syntax
Details

Syntax

objectName._setInstanceMethod( methodName, entry );
objectName._setInstanceMethod( methodName, entry, label );
objectName._setInstanceMethod( methodName, entry, label, when );

Argument Type Use Description
methodName Character Input specifies the method name
entry Character Input specifies the SAS/AF entry where the method code is implemented
label Character Input specifies the SCL label where the METHOD statement is found within the entry. If omitted or blank, the entire SAS/AF entry will execute
when Character Input specifies when to execute the per-instance method in relation to other per-instance methods and the class method: BEFORE, AFTER or OVERRIDE (default)


Details

Values for the 'when' Argument
Value Description
BEFORE The new per-instance method runs before other already existing per-instance methods of the same name. The entry specified for a BEFORE method should not invoke the SUPER method; it is executed automatically after all the BEFORE and OVERRIDE per-instance methods execute.
OVERRIDE The new per-instance method runs instead of the already default existing method of the same name, if the method is defined for the object's class. This is the default if when is not specified. The entry specified for an OVERRIDE method may or may not invoke the SUPER method, depending on the desired behavior.
AFTER The new per-instance method should be run after other already existing per-instance methods of the same name. The entry specified for an AFTER method should not invoke the SUPER method; it is executed automatically.


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.