"the target" also valid for disabled buttons?

Paul Dupuis paul at researchware.com
Thu Mar 17 13:02:30 EDT 2016


Messages that are explicitly sent (as in using SEND or DISPATCH) to a
disable control will be executed. This is not a bug.

All you need to do is replace: send "handle_mouseup next" to grp
"navibuttons1" in 0
with: if the enabled of grp "navibuttons1" is true then send
"handle_mouseup next" to grp "navibuttons1" in 0

and likewise for the "Back" case.


On 3/17/2016 12:48 PM, Klaus major-k wrote:
> Hi all,
>
> sorry for the strange subject, but I have a strange problem
> and wonder if this is a bug or feature.
>
> I have 3 buttons in a group with this script:
> on mouseUp
>    switch the short name of the target
>       case "Next"
>          send "handle_mouseup next" to grp "navibuttons1" in 0
>          #go next
>          break
>       case "Back"
>          send "handle_mouseup prev" to grp "navibuttons1" in 0
>          break
>       case „another button“
>          ## not handled yet...
>       break
>    end switch
> end mouseUp
>
> Now in some situations one of these buttons is diabled, but the 
> script executes as if the button is still ENabledm which causes 
> inconvenience, read ERRORS! Know what I mean?
>
> So is this a bug and the script should NOT work for diesabled buttons or should it?
> Thanks for any insight!
>
> LC 7.1.3 stable on OS X 10.11.3
>
>
> Best
>
> Klaus
> --
> Klaus Major
> http://www.major-k.de
> klaus at major-k.de
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list