I realize that I'm several years late to this thread, but I wanted to note for future passers-by that the comments here and bug reports about this 'problem' are basically misinformation...
An Extension Builder Widget does NOT send any events at all by default, and they aren't meant to.
The Extensions author must write handlers that 'post' messages back to the scriptObject, forwarding them in response to touch, mouse, scroll-wheel and other events messages received by the Widget module.
The widget author can mirror the standard engine messages (Exp. in LCB: post 'mouseDown' to tScriptObject) or they can create their own custom messages for their widget: (Exp. LCB: post '"knobTurnClockWise" && tDegrees to tScriptObject). The standard handlers in LCB are defined like so:
... OnMouseUp, OnMouseStillDown, OnMouseLeave, and more can be implemented in a widget or not.
On the other hand a Widget might be designed as non-interactive , for use purely a mechanism for displaying some information, and therefore may not be meant to send or receive any messages. So it makes sense NOT to automatically enable a base set of messages sent for widgets (of course some sort of template with these basic handlers filled out is helpful).
For a widget to be able to receive keyboard focus it seems that 'traverOn' must be set to true.
An Extension Builder Widget does NOT send any events at all by default, and they aren't meant to.
The Extensions author must write handlers that 'post' messages back to the scriptObject, forwarding them in response to touch, mouse, scroll-wheel and other events messages received by the Widget module.
The widget author can mirror the standard engine messages (Exp. in LCB: post 'mouseDown' to tScriptObject) or they can create their own custom messages for their widget: (Exp. LCB: post '"knobTurnClockWise" && tDegrees to tScriptObject). The standard handlers in LCB are defined like so:
CODE:
handler OnMouseDown( in pButton as Number) post "mouseUp" && pButtonend handler
On the other hand a Widget might be designed as non-interactive , for use purely a mechanism for displaying some information, and therefore may not be meant to send or receive any messages. So it makes sense NOT to automatically enable a base set of messages sent for widgets (of course some sort of template with these basic handlers filled out is helpful).
For a widget to be able to receive keyboard focus it seems that 'traverOn' must be set to true.
CODE:
set the traversalOn of widget "MyKeyboardWidget" to true
Statistics: Posted by PaulDaMacMan — Tue May 07, 2024 9:03 pm