Rawkey events, widgets, and scrolling groups

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
trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1005
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

Rawkey events, widgets, and scrolling groups

Post by trevordevore » Fri Mar 27, 2015 5:13 pm

Current widgets eat scroll wheel raw key events. This causes a problem if you have a widget in a group that you try to scroll using rawkeydown events. Are there any workarounds available right now? It doesn't look like keyboard events are hooked up to widgets yet.
Trevor DeVore
ScreenSteps - https://www.screensteps.com

LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder

LCMark
Livecode Staff Member
Livecode Staff Member
Posts: 1212
Joined: Thu Apr 11, 2013 11:27 am

Re: Rawkey events, widgets, and scrolling groups

Post by LCMark » Mon Mar 30, 2015 8:39 am

@trevordevore: The plan is that widgets will get more specific 'mouseWheel' type events, rather than rawKey events for handling movement of the mouse wheel. Looking at how such scroll events are handled, the widget infrastructure will require some sort of message passing system in place to make them work correctly (for example, on Mac at least, if you scroll a field inside another scrolling entity, then the scroll events are passed by the embedded field if the field is at the extremity of the current scroll direction).

I've filed: http://quality.runrev.com/show_bug.cgi?id=15111.

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1005
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

Re: Rawkey events, widgets, and scrolling groups

Post by trevordevore » Mon Mar 30, 2015 12:52 pm

Thanks @LCMark.
Trevor DeVore
ScreenSteps - https://www.screensteps.com

LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder

LCMark
Livecode Staff Member
Livecode Staff Member
Posts: 1212
Joined: Thu Apr 11, 2013 11:27 am

Re: Rawkey events, widgets, and scrolling groups

Post by LCMark » Mon Mar 30, 2015 6:50 pm

@trevordevore: I took a look at this today and will hopefully have a patch ready tomorrow. LCB does currently support mouse wheel events, they appear to widgets as 'high-level' scroll events - OnMouseScroll(deltaX, deltaY). My patch will mean this event will only be sent and handled by a widget if it contains an OnMouseScroll() handler. To make mouse scrolling work as it needs to though, some 'passing' mechanism will be needed as mentioned above - however, at least with my suggested tweak, you'll be able to put non-mouse-scroll-handling widgets in scrolling groups and have them work as you'd expect.

LCMark
Livecode Staff Member
Livecode Staff Member
Posts: 1212
Joined: Thu Apr 11, 2013 11:27 am

Re: Rawkey events, widgets, and scrolling groups

Post by LCMark » Tue Mar 31, 2015 10:15 am


trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1005
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

Re: Rawkey events, widgets, and scrolling groups

Post by trevordevore » Tue Mar 31, 2015 1:39 pm

Ah, that works much better. Thanks!
Trevor DeVore
ScreenSteps - https://www.screensteps.com

LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder

Post Reply

Return to “LiveCode Builder”