com.livecode.widget.pushbutton mouse events not working

LiveCode Builder is a language for extending LiveCode's capabilities, creating new object types as Widgets, and libraries that access lower-level APIs in OSes, applications, and DLLs.

Moderators: LCMark, LCfraser

Post Reply
pthirkell
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 93
Joined: Tue Nov 17, 2009 6:47 pm
Location: Wellington, New Zealand

com.livecode.widget.pushbutton mouse events not working

Post by pthirkell » Sat Oct 24, 2015 10:54 am

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?

bn
VIP Livecode Opensource Backer
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

Post by bn » Sat Oct 24, 2015 5:05 pm

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

pthirkell
VIP Livecode Opensource Backer
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

Post by pthirkell » Mon Oct 26, 2015 2:50 am

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.

Post Reply

Return to “LiveCode Builder”