IsInDestroy

 (Available in 00 TS Tools(Base) - TS_Tools_Root0)

Purpose

Test if the object is being destroyed

Syntax

IF SELF:IsInDestroy

Description

Test if the object is being destroyed, this flag is only TRUE while the 'Destroy()' method is being executed. When the 'Destroy()' method is done the 'IsDestroyed' access will return TRUE.

Example

METHOD SomeMethod( ) CLASS SomeClass
   DO CASE
   CASE SELF:IsInDestroy
//    Do nothing
   CASE SELF:IsDestroyed
//    Do nothing
   OTHERWISE
//    Do the work
      ... 
   END
   RETURN...

Source

ACCESS IsInDestroy AS LOGIC PASCAL CLASS TS_Root0
LOCAL lIsInDestroy AS LOGIC
   TSTrace Enter
   IF LOGIC( _CAST, _AND( SELF:_ObjectStat1, TS_OBJSTAT1_INDESTROY  ; ...
  ... ) )
      lIsInDestroy:=TRUE
   ELSE
      lIsInDestroy:=FALSE
   END
   TSTrace Leave
RETURN lIsInDestroy