Consultor Eletrônico



Kbase P155386: How to store a Form handle into a temp-table field?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   03/11/2009
Status: Unverified

GOAL:

How to store a Form handle into a temp-table field?

GOAL:

How to store ABL class instance references into a temp-table field?

FACT(s) (Environment):

OpenEdge 10.2A
Windows
OpenEdge Category: NETUI

FIX:

The following sample shows how to store and retrieve an ABL reference into a temp-table:
/* store ABL Form reference into temp-table */
DEF VAR oForm AS Progress.Windows.Form.
DEF TEMP-TABLE tt
FIELD fo AS Progress.Lang.Object.
oForm = NEW Progress.Windows.Form().
CREATE tt.
ASSIGN tt.fo = oForm.
/* retrieve the reference from temp-table */
oForm = CAST( tt.fo, "Progress.Windows.Form" ).
/* Bring form to front and activate */
oForm:BringToFront().
oForm:Activate().
/* close and free up the reference */
oForm:Close().
DELETE OBJECT oForm.