INIT
(Available in 00 TS Tools(Base) - TS_Tools_Root0)
Purpose
Create a 'TS_Root0' instance
Syntax
oRoot0:=TS_Root0{ [#NameOfTheInstance] }
Arguments
Description
This class serves no purpose on its own, the class should be used as a derived from class when defining you own application classes.
Example
CLASS SomeClass INHERIT TS_Root0
METHOD INIT( ..., ... ; ...
...) CLASS SomeClass
// Less secure ( and simple ) form of an '[less]safe' init method
// It is better not to call any object method/access/assign from
// inside the init method, if needed do this form the 'New()' method.
// From here on insert you own initialization code
// Process the parameters
..., ...
IF lParameterError
TSTrace Warning "... parameter error ..."
SELF:InvalidateObject( )
END
// At this point all initialization code should be done
IF SELF:IsValidObject
// The 'New()' method will be called by the SUPER class
SUPER:INIT( ... ; ...
... , ... )
ELSE
TSTrace Warning TS_TEXT_GEN_CAN_NOT_INITIALIZE
SELF:InvalidateObject( )
END
RETURN SELF
METHOD INIT( ..., ... ; ...
...) CLASS SomeClass
//