Referencing a control name
Peter Bogdanoff
bogdanoff at me.com
Sat Jul 25 23:33:31 EDT 2015
Thank you to all that replied to my question--my learned and esteemed colleagues!
I got an education, and got the job done!
Thanks again,
Peter Bogdanoff
UCLA
On Jul 25, 2015, at 11:49 AM, J. Landman Gay <jacque at hyperactivesw.com> wrote:
> 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 hyperactivesw.com
> HyperActive Software | http://www.hyperactivesw.com
>
> _______________________________________________
> 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