Method Abstract():initClass() Foundation

Method for class object initialization.

Syntax
:initClass( [<paramList,...>] ) --> oClassObject
Parameters
<paramList>
The parameters passed to the class function are also passed to :initClass().
Return

The method returns the class object of a class.

Description

The class method :initClass() can optionally be declared within the class declaration (between the CLASS...ENDCLASS statements). When it is declared, it is executed immediately after the first call to the class function, as soon as the class object has been generated. It can be used to initialize class variables with default values and must be programmed separately. The arguments passed to the class function are passed to the method :initClass(). The class object can be referenced within the source code of :initClass()via the variable self.

if :initClass() is not declared in a subclass, the :initClass() method of the superclass is implicitly executed when the class object of the subclass is created. When :initClass() is declared and implemented, the :initClass() method of the super class must be called explicitly.

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.