How to dynamically call class

Posted by stingray70m on 28-Nov-2016 13:32

Is it possible to dynamically call a variable with a class name? The class I would like to call is PROG1.

ie:

define variable v-object as class Telerik.WinControls.UI.RadForm.

define variable v-class as character no-undo.

v-class = "PROG1".

v-object = new v-class()  instead of  v-object = new PROG1().

Possibly cast the variable as the class or create a function.

Any help would be appreciated!!

Thanks

Mark

Posted by Brian K. Maher on 28-Nov-2016 13:36

Look at either the DYNAMIC-NEW function or the dynamic call object.

All Replies

Posted by Brian K. Maher on 28-Nov-2016 13:36

Look at either the DYNAMIC-NEW function or the dynamic call object.

Posted by Peter Judge on 28-Nov-2016 13:38

DYNAMIC-NEW () or GET-CLASS(foo):New()

Posted by stingray70m on 28-Nov-2016 14:13

Dynamic-new() worked great, Thanks!!!

This thread is closed