There has been a lot of discussion and demand for mouse events in Xojo Web 2.0. I think Xojo is bringing them back for Canvas, but I wrote a class to bring mouse events to any
TP_WebMouse fills the need for mouse events on any control in Xojo Web 2.0. The class can track move, click, enter, and exit events. These events are sent to the server for developers to handle any way they like.
More info here: https://strawberrysw.com/tp-webmouse/
Live demo here: https://webmouse.xojo.dev/
If you have any questions about the class please don’t hesitate to ask!
This seems like a spectacular solution to a problem that exists, but shouldn’t exist.
If I end up building any Web 2.0 apps (which is a huge IF based on my experience with it so far), I will undoubtedly purchase this–but the fact that it isn’t built-in as it was in 1.0 is truly mind-boggling to me. I could understand having it disabled by default requiring specific events to be enabled as-needed, but removing the capability is still unfathomable to me as it assumes use-cases that just aren’t remotely universal.
If my future corporate intranet apps (where latency isn’t an issue) are built using Web 2.0, you’ll be getting my money. If my future apps with public access are built using Web 2.0 but need a particular event tracked for specific functionality despite the risk of latency issues, you’ll be getting my money.
Are you also considering keypress functionality?
I haven’t seen as much interest / need for this functionality so I hadn’t looked into it. I know the framework traps the tab key in an awkward way, so I’'m not immediately certain if it’s possible.
Any chance it works with touch events for mobile?
mousemove specifically. As I look it up, touch events are their own thing. I could certainly add touch events.
It raises the question should the touch events be tracked automatically with the click events, or should they be their own option?
The CanIUse for TouchEvent doesn’t indicate Safari iOS support o.O
I believe jQuery Touch Punch is typically used. I’m not sure if Xojo included the jQuery mobile stuff with their stack. I personally would like to see a single PressedEvent and have the event Object provide information such as if it was a touch or mouse click, and details such as which button or how many fingers were used etc…
I just bought your mouseevents tool, i haven’t tested it but i already have a question:
Can i adjust the time between 2 readings of the events, there can be a rather big difference in webtraffic if it is local or via external web. Therefor it could be handy to be able to change the timing.
Oh… and don’t wait to long to release also key- and touch-events module, i am sure there is interest for that too!
Are you talking about the 200ms?
This event is only raised when the mouse stops moving for
Or are you talking between consecutive Mouse-Down or other events?
Yes, i meant this one, I asked the question right after download without testing and i hadn’t read anything about the possibility to adjust, but in the meantime i found where to do that.
Anyway thanks for your efforts to find this out and inform me.
Hey sorry about the delay in response. I’m catching up from falling ill this week.
I would expect that with more documentation I can flesh this tool out to be a little more useful.
Yes please Tim . . . Keypresses are important in my apps.
Of course my ultimate goal is drag and drop between weblistboxes