TouchScreen mouseDown issue

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
raugert
Posts: 112
Joined: Thu May 26, 2016 9:30 pm
Location: Winnipeg, Canada

TouchScreen mouseDown issue

Post by raugert » Fri Apr 15, 2022 3:46 pm

I have an app designed for Mac and Windows. I use the mouseDown and mouseUp in a button to execute different commands. It works fine when using the mouse or the touchpad on a PC laptop, but doesn't respond correctly when using the touchScreen. The mouseDown command triggers when I release the button on the touchScreen. (It's as if it's backwards ??) The mouseUp command is never sent.

I tried adding touchStart and touchEnd to the script but to no avail.

Any advice is much appreciated...
Livecode Indy 9.6.11 (Stable)
MacOS Sonoma 14.2
Xcode 15.0.1 SDK 17.0

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7228
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: TouchScreen mouseDown issue

Post by jacque » Sat Apr 16, 2022 5:59 pm

That used to be a problem on mobile too but it was fixed. If I remember right, mouseDown is sent by the OS but mouseUp is artificially generated. I'm not sure why it doesn't work on the touchscreen. Maybe LC doesn't recognize it as a touch device because it's running a desktop OS?
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

SparkOut
Posts: 2852
Joined: Sun Sep 23, 2007 4:58 pm

Re: TouchScreen mouseDown issue

Post by SparkOut » Sat Apr 16, 2022 6:08 pm

It used to work fine way back in versions 5.x.x 6.x.x and maybe some of the 7s that I used to use for a (Windows) desktop game in kiosk mode with a touch screen to control the points of a train track. That was only using mouseUp IIRC, not mouseDown and certainly never touchStart and touchEnd.
I can't say if and when it might have stopped working, I have no touchscreen I can try it with on newer versions.

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

Re: TouchScreen mouseDown issue

Post by FourthWorld » Sat Apr 16, 2022 7:20 pm

Most touch screens deliver messages to the OS in the same way touchpads do.

Have you seen any anomalous behavior with other apps? Or with a touchpad or mouse?

What is the make and model of the device?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

raugert
Posts: 112
Joined: Thu May 26, 2016 9:30 pm
Location: Winnipeg, Canada

Re: TouchScreen mouseDown issue

Post by raugert » Sat Apr 16, 2022 8:59 pm

Hi Richard. Here is a simple example stack. It works fine with the mouse and touchpad but not with the touchScreen. I tried it on a 15" HP envy laptop with touchscreen. I had a report that it doesn't work on Dell touchscreen either..

thanks,
Richard
UpDown Test.livecode.zip
(1.14 KiB) Downloaded 105 times
Livecode Indy 9.6.11 (Stable)
MacOS Sonoma 14.2
Xcode 15.0.1 SDK 17.0

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

Re: TouchScreen mouseDown issue

Post by FourthWorld » Sat Apr 16, 2022 11:19 pm

Thank you for posting the stack, but the only touch devices I have here right now are iOS and Android, so I won't be able to test the stack on Windows.

I asked for the make and model of the devices in question to see if users in those forums have found anomalies with other software that relies on standard OS messaging. Checking those forums would seem a useful diagnostic move.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

raugert
Posts: 112
Joined: Thu May 26, 2016 9:30 pm
Location: Winnipeg, Canada

Re: TouchScreen mouseDown issue

Post by raugert » Sun Apr 17, 2022 11:34 pm

I've scoured the forums but haven't found anything very useful. However, I did discover that if I move my finger ever so slightly on the button, the mouseDown function triggers properly and when I release it the mouseUp function also works.

I tried setting different properties of the button (sharedHilite, traversal, focusBorder etc.) but it made no difference.

My discovery leads me to believe that there may be a workaround but I'm at a bit of a loss...

thanks for any insight.
Livecode Indy 9.6.11 (Stable)
MacOS Sonoma 14.2
Xcode 15.0.1 SDK 17.0

stam
Posts: 2679
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: TouchScreen mouseDown issue

Post by stam » Sun Apr 17, 2022 11:49 pm

I too do not have a windows system with a touch screen to test this on, but sounds like it may be worth a bug report?

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”