Maybe I’m attempting the impossible. I’m aware of the duplicate name issue which is why I pass it as an optional parameter. However this code doesn’t have any error checking and that’s not good.
I was hoping to simply the helper to create the control like this.
PROCEDURE TCONTROL_HELPER.CREATE_THIS_CONTROL(CONST VAR THIS_CONTROL:TCONTROL;CONST THE_NAME:SHORTSTRING);
But the tcontrol type doesn’t work well with different variables. Untyped variable parameter doesn’t work either nor does using this_control:= this_control.classtype.create (self );
Im trying to keep it simple, for the time being I will just send the type I’m creating as a parameter..
Thanks for the help everyone.