Page 1 of 1
Switch Button Widget
Posted: Thu Aug 25, 2016 9:42 am
by nrprioleau
Please can someone explain why this code in my switch button generates an error in the IDE as well as the standalone?
Code: Select all
on hiliteChanged
put the hilited of me into tAction
doChangeRecord tAction
end hiliteChanged
Re: Switch Button Widget
Posted: Thu Aug 25, 2016 9:59 am
by bn
Hi nrprioleau,
change your code to
Code: Select all
on hiliteChanged
put the hilite of me into tAction
doChangeRecord tAction
end hiliteChanged
there seems to be an error in the default script of the switch button: the property is not "hilited" but "highlight" or "hilite"
Kind regards
Bernd
Edit: I reported this as a bug:
http://quality.livecode.com/show_bug.cgi?id=18260
Edit of the Edit:
it is not a bug because I just dragged the switch button off the toolbar and it did not show the status in the message box. It turns out that the script has to be opened once and compiled for it to work.
I marked the bug report as "not a bug"
But this leaves the question why your script does not work. It seems the problem is not in the default script of the switch button but further down in your handler "doChangeRecord tAction".
Re: Switch Button Widget
Posted: Thu Aug 25, 2016 1:55 pm
by nrprioleau
Hi thanks, that worked great!