change label name

Bob Hartley rev at armbase.com
Fri Feb 18 02:22:10 CST 2005


At 23:37 17/02/2005, you wrote:

>Bob Hartley wrote:
>
>>Hi All.
>>I have a button that copies a label from one stack to another stack.
>>
>>the code changes the name OK but I want to change the visible text in the 
>>label.
>>
>>the code is
>>on mouseUp
>>   global tFileName
>>   copy field "LabelName" of stack "Armbase" to card 1 of stack tFileName
>>   set the name of field LabelName of stack tFileName to field 
>> LabelNewName of stack "Armbase"
>>   --the above is OK and copies the label and changes its name to the 
>> contents of a field
>>   set the label of field LabelName of stack tFileName to field 
>> LabelNewName of stack "Armbase"
>>--this one above generates an error
>>end mouseUp
>>
>>I tried using the words contents and name etc in thelast line but without 
>>any luck.
>>
>>Any ideas. I'm sure this is simple.
>
>Two possibilities / suggestions:
>
>1. did the line
>       set the name of field LabelName of stack tFileName to field 
> LabelNewName of stack "Armbase"
>change the name, such that the field can no longer be identified as
>field LabelName


Hi Alex.

Yes the name did change. I thought that the label text would change with 
something similar.

Off to work now so i'll get into it later.
Cheers
Bob: Glasgow


>(and, btw, I'd be strict about putting quotes around LabelName ---- and 
>even suggest setting explicit variables)
>
>2. fields don't (AFAIK) have a "label" property - it should be
>     set the text of ....
>
>
>--
>Alex Tweedly       http://www.tweedly.net
>
>
>
>--
>No virus found in this outgoing message.
>Checked by AVG Anti-Virus.
>Version: 7.0.300 / Virus Database: 265.8.8 - Release Date: 14/02/2005
>
>_______________________________________________
>use-revolution mailing list
>use-revolution at lists.runrev.com
>http://lists.runrev.com/mailman/listinfo/use-revolution
>
>
>
>--
>No virus found in this incoming message.
>Checked by AVG Anti-Virus.
>Version: 7.0.300 / Virus Database: 265.8.8 - Release Date: 14/02/2005


-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.8.8 - Release Date: 14/02/2005




More information about the use-livecode mailing list