mouseUp vs mouseDown

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

Post Reply
townsend
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 430
Joined: Sun Feb 13, 2011 8:43 pm

mouseUp vs mouseDown

Post by townsend » Tue Jun 26, 2012 10:34 pm

I made an interesting discovery today.
I've got a lot buttons that perform operations on various Scrolling Fields.
Some buttons perform multiple operations on two or more fields.
I've noticed for a while now, LiveCode seem to be very slow in these operations.
Now I understand why. The lag was the amount of time I was holding down clicks.
It's just a split second really, but it's very visible as these events happen on the screen.

So now I've changed all my Buttons to mouseDown handlers instead of mouseUp.
And wow-- visually there is a big difference. Just thought I'd pass that along.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10320
Joined: Wed May 06, 2009 2:28 pm

Re: mouseUp vs mouseDown

Post by dunbarx » Tue Jun 26, 2012 10:48 pm

The issue is usually the interface guideiines. Users are accustomed to having an action initiated on mouseUp, as a rule. Some objects, like the various pulldown/combo box/popup buttons work on mouseDown, and this, too, is the expected behavior. It sounds like a trivial thing, but be careful that you do not confuse anyone. The flexibility is there, of course, and there are occasions where both are used in the same script.

Craig Newman

townsend
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 430
Joined: Sun Feb 13, 2011 8:43 pm

Re: mouseUp vs mouseDown

Post by townsend » Wed Jun 27, 2012 12:00 am

Good to know-- this may not be such a good idea with mobile apps.

Thanks Craig--

Post Reply