vl-doc-ref and control name as string

Started by jmaeding, April 17, 2014, 01:19:13 PM

Previous topic - Next topic

jmaeding

I do this:
(dcl_Control_SetCaption (vl-doc-ref 'GISData_frmGISData_lblPage) "abc")
I want to do this:
(dcl_Control_SetCaption (vl-doc-ref (QUOTE (READ "GISData_frmGISData_lblPage"))) "abc")

but it does not work.
Is there a way to use a string to access a control when using sep namespace format of vl-doc-ref?

jmaeding

just got it, use:
(dcl_Control_SetCaption (vl-doc-ref (READ "GISData_frmGISData_lblPage")) "ABC")
instead.
No need for quote function.

Owen mentioned a while back that the two string method of accessing controls is less efficient.
So making a string and calling with read is the trick if you need to make control names programmatically, and for separate namespace.