Radio Buttons / Break

DunbarX at aol.com DunbarX at aol.com
Tue Jan 18 15:13:31 EST 2011


I am sure Colin could write a much longer handler that does what this one 
does.

on mouseup
    if the hilite of me <> true then
       set the hilite of me to true
       break
    end if
    if the hilite of me = true then
       set the hilite of me to false
    end if
end mouseup

Break works OK. It just passes control to the end of the handler. The docs 
say is acts like "exit", and it does.
The way the script is written requires it, because there are two distinct 
if/then structures, and the second would be invoked regardless of whether or 
not the first was. 

Craig Newman

> You can use break in an if end if structure??

sure you can!

But I won't make sense and will probably throw an error :-D



More information about the use-livecode mailing list