LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!
on TurnOffCheckboxes
repeat with x = 1 to number of cards
repeat with y = 1 to number of buttons of grp "CheckboxGroup" of cd x
set the hilite of btn y of grp "CheckboxGroup" of cd x to false
end repeat
end repeat
end TurnOffCheckboxes
Does this work for you?
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Are you sure that the script is completely empty except for the code I posted here? If not, what else is in the button script?
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
on TurnOffCheckboxes
repeat with x = 1 to number of cards
repeat with y = 1 to number of buttons of grp "CheckboxGroup" of cd x
set the hilite of btn y of grp "CheckboxGroup" of cd x to false
end repeat
end repeat
end TurnOffCheckboxes
EDIT: Mark. I tried it again and the compile errr went away but nothing happened.
Have you tries restarting Revolution already? What else have you tried? I have tested the script and it doesn't cause an error here, when I compile it. There is probably a bug in Revolution or you have a script still running without knowing it (e.g. a repeat loop or a script with a recursive send command or because there is another script with an execution error, which hasn't been stopped yet).
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Sticking my nose in ... what I think is happening is this: Mark's code is actually a procedure (I think Revolution calls this a custom command). So you could place Mark's code in the card (or stack) script, and then all you need to put in the button script is
If you only use the code in one place, and you want to put all of the code in the button script, all you need to do is remove the first and last lines, i.e. get rid of
Hi Mark.
There was another error being thrown up but I tracked it down to the fact that I did'nt have a CheckboxGroup" on every card in the stack. Once I placed a group on every stack the error dissapeared.