BBjControl::isDestroyed

Descriptions

In BBj 7.0 and higher, this method returns true after invoking the BBjControl.destroy() method on the BBjControl.

Syntax

Return Value

Method

boolean

isDestroyed()

Parameters

None.

Return Value

Returns whether the program has called destroy() on the BBjControl, where 1 = destroy() called and 0 = destroy() not called.

Remarks

Most other methods will begin to generate errors after invoking destroy(). This method will continue to return the appropriate value.

Example

rem 'Create BBjWindow Objects

rem 'Obtain the instance of the BBjAPI object
let myAPI! = BBjAPI()

rem 'Open the SysGui device
SYSGUI = UNT
OPEN (SYSGUI) "X0"

rem 'Obtain the instance of the BBjSysGui object
let mySysGui! = myAPI!.getSysGui()

rem 'Set common addWindow param values
X = 10
Y = 10
WIDTH = 200
HEIGHT = 200

rem 'Create a window with a title in the current context
TITLE$="BBjWindow Destroy Example"

rem 'Set the current context
mySysGui!.setContext(0)
myWindow! = mySysGui!.addWindow(X,Y,WIDTH,HEIGHT,TITLE$)
PRINT myWindow!.isDestroyed()

rem ' Will print "0"
myWindow!.destroy()

rem ' Will print "1"
PRINT myWindow!.isDestroyed()

See Also

BBjControl

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.