Basic question - how to use a variable to refer to an object (button) -Thanks

Stephen King st.king42 at ntlworld.com
Sun Jul 20 15:51:01 EDT 2003


Hi,

Thanks for the info - it sort of backed up my own thoughts so thats really
useful in telling me I'm on the right track.

I found the specific problem though  its a little more subtle, it seems that
you can't label a button with a number and do this sort of thing.
Unfortunately this is exactly what I did! The program is for swimming lap
analaysis and so I just used a number as the label for lap select buttons.

I found this by using text labels (as in your example) then going back to my
numbers. As you say,  works fine with text, but apparently not with a
number.

So, problem sorted now (just 60 buttons to re label!) and I feel much more
confident that I know how to use the Object.

many thanks for the guidance
Steve

PS coming from VB/VBA, I'm finding rev a bit 'different' while I'm waiting
for my hard manuals to come through.

------------------------------------------------------
>the following code worked fine for me:
>
> on mouseUp
>    local tButtonName
>    put "bob" into tButtonName
>    set the label of button tButtonName to "hello"
>  end mouseUp

>i had 2 buttons, one named "bob" and the other was just >a generic "new
button".. clicking the generic button >would change the label of button
"bob"..
>
>is there something else that you were looking to do?





More information about the use-livecode mailing list