Previous Next

HANDLE function
Converts a string representation of a handle to a valid handle.
Syntax 
 
HANDLE ( handle-string )
Caution:
handle-string
A string representation of a handle. Since handles are integer values, the string must contain only numeric characters.
Example 
The following procedure creates a frame, stores the handle of the frame as a string value, deletes the frame, converts the string representation of the frame handle back to a valid handle, and then tests if the handle is valid:
 
DEFINE VARIABLE whand AS HANDLE    NO-UNDO.
DEFINE VARIABLE chand AS CHARACTER NO-UNDO.
 
CREATE FRAME whand.
chand = STRING(whand).
DELETE WIDGET whand.
whand = HANDLE(chand).
MESSAGE VALID-HANDLE(whand) VIEW-AS ALERT-BOX INFORMATION BUTTONS OK.
The VALID-HANDLE function returns a FALSE value because the frame was deleted and the handle is no longer valid.
Notes 
*
*
See also 
CREATE widget statement, DATE function, DECIMAL function, INTEGER function, STRING function, VALID-HANDLE function

Previous Next
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates.