NeedNew
(Available in 00 TS Tools(Base) - TS_Tools_Root0)
Purpose
Flag that calling the 'New()' method has been done
Syntax
IF SELF:NeedNew
Arguments
Description
See the documentation of the 'Init()' method
Example
METHOD INIT( ..., ... ; ...
...) CLASS SomeClass
// Most secure ( and complex ) form of an 'safe' init method
// See also the 'Init()' method documentation
DO CASE
CASE SELF:IsInited
TSTrace Warning "Can not re-init"
CASE SELF:IsInInit
SELF:CountInInit( TRUE )
// From here on insert you own initialization code
// It is better not to call any object method/access/assign
// Process the parameters
..., ...
IF lParameterError
TSTrace Warning "... parameter error ..."
SELF:InvalidateObject( )
END
// At this point all initialization code should be done
SELF:CountInInit( FALSE )
IF SELF:IsValidObject
SUPER:INIT( ... ; ...
... , ... )
IF SELF:NeedNew
SELF:NeedNew:=FALSE
// Put your 'PostInit()' code in the 'New()' method
SELF: