Referencing a control name

J. Landman Gay jacque at
Sat Jul 25 14:49:37 EDT 2015

On 7/25/2015 9:22 AM, Sri wrote:
> The parenthesis placements are key in such references as they change the
> order of command processing.
> For example:
> 1. Create a button "Test1" of width 82 (say)
> 2. Create a field "Field1" of width 168 (say) containing the text: /button
> "Test1"/
> 3. Type into message box
> put the width of field "Field1"
> Answer: 168
> 4. Type into message box
> put the width of (field "Field1")
> Answer: 82

This is working as expected. When you "get" a field, it is the same as 
getting the text of the field. In this case, the text is a reference to 
a button and because of the parentheses, the engine resolves that as a 
reference to the button control.

It is equivalent to:

get the text of fld "Field1" --> "button "test1"
put the width of it --> 82

Jacqueline Landman Gay         |     jacque at
HyperActive Software           |

More information about the Use-livecode mailing list