Getting the long name(or ID) of a control

Scott Rossi scott at tactilemedia.com
Wed Jan 27 01:15:56 EST 2016


What Colin said.

You CAN use unquote object names, but I think it was Jacque who pointed
out a while back that quoting control names results in slightly faster
execution, since the engine doesn't need to determine if your word is a
variable or an object name.  Ever since that explanation, I started
quoting everything.

Regards,

Scott Rossi
Creative Director
Tactile Media, UX/UI Design




On 1/26/16, 9:04 PM, "use-livecode on behalf of Ralph DiMola"
<use-livecode-bounces at lists.runrev.com on behalf of
rdimola at evergreeninfo.net> wrote:

>Riddle me this Batman:
>
>I have 2 controls named "F1"(field) and "menu"(button) both in a group
>named
>G1
>
>Why does this work...????
>put "F1" into somevar
>put the long name of control somevar into someothervar
>
>But this does not work...
>put "F1 of group G1" into somevar
>put the long name of control somevar into someothervar
>
>This works....
>put "F1 of group G1" into somevar
>put the long name of ("control"&&somevar) into someothervar
>
>This also works....
>put "F1" into somevar
>put the long name of ("control"&&somevar) into someothervar
>
>But this does not
>put "menu of group G1" into somevar
>put the long name of ("control"&&somevar) into someothervar
>
>But this does
>put quote&"menu"&quote&&"of group G1" into somevar
>put the long name of ("control"&&somevar) into someothervar
>
>And this works
>put "menu" into somevar
>put the long name of control somevar into someothervar
>
>Menu seems to be a keyword or something. What am I missing? Should there
>always be quotes around control names? (banging head against wall)
>
>Ralph DiMola
>IT Director
>Evergreen Information Services
>rdimola at evergreeninfo.net
>
>
>_______________________________________________
>use-livecode mailing list
>use-livecode at lists.runrev.com
>Please visit this url to subscribe, unsubscribe and manage your
>subscription preferences:
>http://lists.runrev.com/mailman/listinfo/use-livecode






More information about the use-livecode mailing list