UserInput Mouseup and Doublemouseup

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9801
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: UserInput Mouseup and Doublemouseup

Post by FourthWorld » Tue Jan 31, 2023 6:12 pm

trevix wrote:
Mon Jan 30, 2023 4:51 pm
My standalone on mobile, connects with sockets to a remote standalone (on mobile too).
The mobile A shows a screenShot (received from B) and should allow the user to do a 1Click, a double click and a hold, that get transmitted to mobile B.
This has to be done with a single button on mobile A, for several reasons that regards the UX.
Can you tell us more about this UX necessity?

Scripting tools like LiveCode do a great job of providing high-level access to the underlying OS routines provided to support common interaction models. But both a scripting language and the OS APIs it relies on will sometimes be very challenging when attempting new interaction models.

In most UIs, we do sometimes see buttons behave differently in response to different input gestures, but I can't recall a case where a button changed its role.

For example, in the Finder a button can be clicked once to select, or double-clicked to invoke the action of opening it. But it's worth noting that indicating state change ("selected") isn't an action per se, merely preparing the icon for an action invoked elsewhere (the Open item in the File menu). The double-click is a shortcut for this select-then-act interaction, but selection by itself invokes no action.

I took the time to go through my archives to find two posts to the Use-LiveCode list that go into this in more detail, included in this earlier reply:
https://forums.livecode.com/viewtopic.p ... 969#p43125

All that said, sometimes there is a true need to invent new interaction models.

If we can learn more about yours we may be better empowered to find a with-the-grain solution to support it.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

trevix
Posts: 950
Joined: Sat Feb 24, 2007 11:25 pm
Location: Italy
Contact:

Re: UserInput Mouseup and Doublemouseup

Post by trevix » Wed Feb 01, 2023 9:31 am

Oh, god. Let me try...

My sport app "Referi" connects, from mobile trough sockets, to the same app running on a TvBox attached to a TV set.
This allows having a budget scoreboard on sports.
After connection, the player/referee with its mobile is thus able to set up a match, start it on the scoreboard and then put away his phone.

Two bluetooth buttons are paired with the TvBox. Each time they get pressed, the corresponding team advances its score.
The BT buttons have 3 functions: single click (advance the score), double-click (listen to the score again or flag an interesting point, according to setting), hold (correct the score: undo or other functions, according to settings).

After having launched the match, the player's mobile, if still connected or reconnected, receives at each improvement of the score a screenshot from the TvBox, and he is able to stop the match, restart a new match, flag a match point and, this is what we are talking about, add a point directly or correct the point directly, without using the BT buttons.
These functions are a necessity when there is an external referee that keeps the score.
He can use the two BT buttons but, if for any reason one of them doesn't work, he must be able to keep the score running.

Finally: I could put, on top of the screenshot on the connected mobile, 4 buttons: 2 for advancing the team score + 1 for double click + 1 for hold.
But the screenshot is already clogged of things: a clean and consistent UX in my opinion would mimics what is done with the BT buttons, essentially putting all the mouse click scripts on the screenshot image control and using the position of the click in order to detect which team is the command directed too.
Attachments
Schermata 2023-02-01 alle 09.26.46.png
Trevix
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9801
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: UserInput Mouseup and Doublemouseup

Post by FourthWorld » Thu Feb 02, 2023 10:29 am

Thank you for taking the time to provide that background. Very helpful. I have a much clearer idea of the design goals.

I can appreciate the value here in having the software work similarly to the hardware devices, with a single button serving multiple roles.

But that seems more of a manufacturing cost decision than the design team's idea of the optimal UI, no?

Could the large horizontal area that's currently vacant be a place to put the buttons?

If not, as much as I can appreciate delivering consistency between the hardware and software input modes, what you've discovered pursuing it is not anomalous; mixing button roles isn't commonly done, so if there's a way to do it it's against the grain of the underlying OS APIs, so expect a need for iterative experimentation and refinement.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

trevix
Posts: 950
Joined: Sat Feb 24, 2007 11:25 pm
Location: Italy
Contact:

Re: UserInput Mouseup and Doublemouseup

Post by trevix » Thu Feb 02, 2023 10:46 am

But that seems more of a manufacturing cost decision than the design team's idea of the optimal UI, no?
Yes. The best for us would be a low price sport wrist band, with BT 5,30 mt range and 3 buttons. But then, I am sure we would have gone for more functions, assigning a double click to the buttons, and so on :D
Could the large horizontal area that's currently vacant be a place to put the buttons?
No. Somehow in the screenshot did not come out, but on top there is the name of the court. Also, the screenshot gets resized accordingly to the source (TV or even Tablet). Not always we can count on a 16/9 size, so the all area must be available.
Anyway, my script now is working and probably will until the next OS or hardware update. (sigh)
Trevix
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9801
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: UserInput Mouseup and Doublemouseup

Post by FourthWorld » Thu Feb 02, 2023 8:49 pm

Glad you got it working. And thank you for this thread. This was an interesting problem that touches on areas we see newcomers encounter as well. A useful contribution to this knowledge repository.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”