WindowIsDefined Function

Action

Tests whether a child window, method, variable, or property is defined by a window or its class.

Syntax

bResult = WindowIsDefined (wWindow, sName [, wcClass, sSource])
Variable Description
bResult TRUE if sName is defined by the window or by its class; FALSE if sName is not defined. BOOLEAN.
wWindow The window that contains the child window, method, variable, or property to test. WINDOW.
sName The name of the child window, method, variable, or property. STRING.
wcClass Optional: The window class of sName if it is defined by the window’s class. NULL if sName is defined by the window or not defined. out DATACLASS.
sSource Optional: The name of the file where sName is defined; this string will include the line number if wWindow is a window instance variable. out STRING.

Notes

In the example below, the Close method is defined for the TextEditor window in the MoveableWin class, so the third argument returns the name of that class. If the Close method were not defined in a window class, the third argument would return NULL.

Example

[ ] use "textedit.inc"
[-] main ()
	[ ] DATACLASS Class 
	[ ] Print (WindowIsDefined(TextEditor, "Close", Class)) 
	[ ] //Prints TRUE 
	[ ] Print (Class)
	[ ] //Prints MoveableWin