IsDestroyed

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

Purpose

Test if the object is destroyed

Syntax

IF oObject:IsDestroyed

Description

Test if the object has been destroyed. While the object is being destroyed ( while the 'Destroy()' method is being executed ) this access returns FALSE.

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 IsDestroyed AS LOGIC PASCAL CLASS TS_Root0
LOCAL lIsDestroyed AS LOGIC
   TSTrace Enter
   IF LOGIC( _CAST, _AND( SELF:_ObjectStat1, TS_OBJSTAT1_DESTROYED  ; ...
  ... ) )
      lIsDestroyed:=TRUE
   ELSE
      lIsDestroyed:=FALSE
   END
   TSTrace Leave
RETURN lIsDestroyed