Progress
Language Reference
VALID-HANDLE Function
Verifies that a handle is valid.
SYNTAX
handle
An expression that evaluates to a value of type HANDLE or WIDGET-HANDLE. If the handle represents an object that is currently valid, VALID-HANDLE returns TRUE. If the handle is no longer valid (if, for example, some procedure deleted the object), the function returns FALSE.
EXAMPLEIn the following example, the user creates a window dynamically. The WINDOW-CLOSE trigger uses the VALID-HANDLE function to determine whether the window has been created.
In the example, the VALID-HANDLE function returns a TRUE value only if the window has been created (that is, mywin does not have the unknown value) and the window has not been deleted. Therefore, the DELETE WIDGET statement executes only if mywin is a valid widget handle.
NOTES
- A widget handle becomes invalid if the associated widget or procedure is deleted or is out of scope.
- This function is useful when walking through a list of widgets or persistent procedures using the PREV-SIBLING or NEXT-SIBLING attributes.
VALID-HANDLE(handle:PREV-SIBLING) is FALSE when you reach the first handle in the list. VALID-HANDLE(handle:NEXT-SIBLING) is FALSE when you reach the last handle in the list.
- The VALID-HANDLE function supports handles to Progress AppServers, proxy persistent procedures, and remote persistent procedures. For more information on Progress AppServers, see Building Distributed Applications Using the Progress AppServer .
SEE ALSO
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |