Control names should not be using numbers?
Posted: Sun Jun 19, 2016 12:36 am
Hi to all;
I am using livecode Ver 8.1 and developing in windows 7 SP1.
I am an experienced developer in other high level and scripting languages but fairly new to livecode
which recently perked my interest.
I need some guidance on the following: Many forum entries I have recently followed make it quite clear that when a script is created which references a control such as buttons and fields; they should use the name property (not the label) or the assigned control ID when using them in their script of interest.
The forum entries also make it clear that you should not use numbers to name your controls to avoid scripting issues. In other words they say something like Button name = Button_1 would be a good name for the control but Button name = 3 would not be considered a good control name.
If this is in fact correct, what are these sample entries in the dictionary referring to?
“set the acceleratorKey of button 1 to "a"
OR
“set the dontWrap of field 1 to true”
1. Do the numbers here refer to something other than their control names? If so, what do these numbers mean?
2. I also noticed that livecode has assigned numbers such as”[8]” to my buttons and fields as seen when the “select object to inspect” icon is selected within the property inspector.
These numbers seem related to the control positions within my main card. Is there some possibility or situation that these numbers could be used in lieu of the control names or control ID numbers?
Thanks to all responders.
I am using livecode Ver 8.1 and developing in windows 7 SP1.
I am an experienced developer in other high level and scripting languages but fairly new to livecode
which recently perked my interest.
I need some guidance on the following: Many forum entries I have recently followed make it quite clear that when a script is created which references a control such as buttons and fields; they should use the name property (not the label) or the assigned control ID when using them in their script of interest.
The forum entries also make it clear that you should not use numbers to name your controls to avoid scripting issues. In other words they say something like Button name = Button_1 would be a good name for the control but Button name = 3 would not be considered a good control name.
If this is in fact correct, what are these sample entries in the dictionary referring to?
“set the acceleratorKey of button 1 to "a"
OR
“set the dontWrap of field 1 to true”
1. Do the numbers here refer to something other than their control names? If so, what do these numbers mean?
2. I also noticed that livecode has assigned numbers such as”[8]” to my buttons and fields as seen when the “select object to inspect” icon is selected within the property inspector.
These numbers seem related to the control positions within my main card. Is there some possibility or situation that these numbers could be used in lieu of the control names or control ID numbers?
Thanks to all responders.