The pushbutton widget is a welcome addition to LC 8. According to the documentation this widget dispatches mouse events to its script object, but the only one that seems to work in DP 7 is mouseup. Others including mousedown,mouse move, dragstart, mouseenter etc don't generate any signs of life. Curiously, mousemove does work when the pointer tool is selected in the IDE (as distinct from the "runtime" browser tool).
In principle at least, is the pushbutton widget intended to support all of the mouse events supported by the "regular" pushbutton object? If so then should I file a bug report?
com.livecode.widget.pushbutton mouse events not working
-
- VIP Livecode Opensource Backer
- Posts: 4003
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Re: com.livecode.widget.pushbutton mouse events not working
Hi,
I think that the pushbutton is intended as a mobile control with it's theming capabilities (adapt to iOS style or Android style). And I think that mobile controls don't react to the usual desktop messages/can not make use of them.
So I don't think it is a bug per se. The pushbutton sends a mouseCancel message when the mouse is released outside of the stack (I looked at the code) Apart from mouseUp and mouseCancel no other messages are sent. BTW those are missing from the documentation and without documentation "mouseCancel" would be hard to figure out but is close to useless anyways because it only triggers if mouse is released outside of stack.
The other question would be if in a desktop environment the usual messages should be sent. I.e. how a widget integrates into the Livecode script environment. If I remember correctly this is being discussed among the engineers.
Kind regards
Bernd
I think that the pushbutton is intended as a mobile control with it's theming capabilities (adapt to iOS style or Android style). And I think that mobile controls don't react to the usual desktop messages/can not make use of them.
So I don't think it is a bug per se. The pushbutton sends a mouseCancel message when the mouse is released outside of the stack (I looked at the code) Apart from mouseUp and mouseCancel no other messages are sent. BTW those are missing from the documentation and without documentation "mouseCancel" would be hard to figure out but is close to useless anyways because it only triggers if mouse is released outside of stack.
The other question would be if in a desktop environment the usual messages should be sent. I.e. how a widget integrates into the Livecode script environment. If I remember correctly this is being discussed among the engineers.
Kind regards
Bernd
-
- VIP Livecode Opensource Backer
- Posts: 93
- Joined: Tue Nov 17, 2009 6:47 pm
- Location: Wellington, New Zealand
Re: com.livecode.widget.pushbutton mouse events not working
Thanks Bernd and you are of course quite right now that I look more carefully ... this is intended as a mobile control
A 'desktop' push button that supported all mouse events would nonetheless be a welcome further addition to the "core set" of widgets for interface design.
A 'desktop' push button that supported all mouse events would nonetheless be a welcome further addition to the "core set" of widgets for interface design.