Hi,
Still doing a comparison between our 4GL (bad according to tamhas) habits and ABL-OO possibilities, and I am wondering if there's an equivalent for the HANDLE function, that is to say retrieving an object instance from a given character string.
Former code :
What I'd like to do :
I searched the online documentation, but I couldn't find something equivalent.
Thanks in advance !
Julien
Still doing a comparison between our 4GL (bad according to tamhas) habits and ABL-OO possibilities, and I am wondering if there's an equivalent for the HANDLE function, that is to say retrieving an object instance from a given character string.
Former code :
Code:
PROCEDURE myProc :
DEF INPUT PARAMETER strHndl AS CHAR NO-UNDO.
DEF VAR hndl AS HANDLE NO-UNDO.
hndl = HANDLE(strHndl).
IF VALID-HANDLE(strHndl)
THEN /* ... */
END PROCEDURE.
What I'd like to do :
Code:
METHOD PRIVATE VOID myProc (INPUT strHndl AS CHAR) :
DEF VAR hndl AS CLASS myClass NO-UNDO.
hndl = OBJECT(strHndl). /* does not exist (yet ?) */
IF VALID-OBJECT(strHndl)
THEN /* ... */
END METHOD.
I searched the online documentation, but I couldn't find something equivalent.
Thanks in advance !
Julien