Function GetName

Started by Emiliano · 2014-06-18 16:32 UTC · 2 replies · SMF topic #2153

Hello to all,
I need to use the function "GetName"

I try to simplify my problem:

(setq NomeBottoneForm (dcl-Control-GetName plug-in/AttivaPlugIn/ButtonAttivaMapColori))
(dcl-Control-SetEnabled NomeBottoneForm nil)


This code, unfortunately, does not work.
In other words, in the second line "dcl-Control-SetEnabled" I need to insert a variable name for the control.

Maybe not work because GetName returns only the name of the button and not all the path "plug-in/AttivaPlugIn/ButtonAttivaMapColori."

Can you help?
author=Emiliano link=topic=2153.msg10766#msg10766 date=1403109147 wrote:
Maybe not work because GetName returns only the name of the button and not all the path "plug-in/AttivaPlugIn/ButtonAttivaMapColori."


You can either construct the complete symbol name as a string, then (eval (read "symbol-name")) to get the handle; or you can use the "project" "form" "control" syntax to specify the control:
(dcl-Control-SetEnabled "myproject" "myform" NomeBottoneForm nil)
author=owenwengerd link=topic=2153.msg10767#msg10767 date=1403117139 wrote:
You can either construct the complete symbol name as a string, then (eval (read "symbol-name")) to get the handle; or you can use the "project" "form" "control" syntax to specify the control:


Perfect!
thanks I solved it as you suggested