changing btn names at the stack level?

J. Landman Gay jacque at hyperactivesw.com
Wed Mar 29 14:46:35 EST 2006


Ben Bock wrote:
> I have a 15 card stack with 31 buttons per page (15 yes, 15 no, 1 Go
> next card).  When I made this stack I screw up and did not name the
> buttons when copy& pasting them.  I want the YES label buttons to be
> named "1" and the NO label buttons named "0".  Can I do this with a
> script, preferably at the stack level?

You can use the sample scripts others have posted, but I would advise 
against naming buttons with number names. This is always a bad idea. You 
should always have at least one alpha character in an object name, 
otherwise Rev can get confused about whether a script is asking for 
"button 1" or a button *named* "1". Depending on your scripts, this can 
cause all kinds of hair-pulling and cuss words.

Alternately, since your labels are already "yes" and "no", your script 
could instead check the label and if it is "yes", put 1 into a variable, 
and if it is "no" then put 0 into a variable. This bypasses the whole issue.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com



More information about the use-livecode mailing list