Label/Button onAction() and onDoubleClick() Both Fire when D

Questions, tips and tricks and techniques for scripting in Servoy

Label/Button onAction() and onDoubleClick() Both Fire when D

Postby kwpsd » Fri May 06, 2011 2:04 am

Version: 5.2.7 - build 1013

We use labels in tableview to display record data. Our user interface convention is as follows:

Double-Click: edits the record

Single-Click: enters a process pertaining to that label

The onAction() and onDoubleClick() methods work as expected if they are mutually excluded from each other (only one method is attached to the label at a time). If both methods are attached to the label, a single-click action works fine. However, a double-click action fires one instance of the onDoubleClick() method and two instanaces of the onAction() method...no matter how fast I double-click. Is this behavior correct? Am I not correctly understanding the usage of these events?

Any help and suggestions are greatly appreciated.

Thanks!
Kim W. Premuda
San Diego, CA USA
User avatar
kwpsd
 
Posts: 687
Joined: Sat Jul 28, 2007 6:59 pm
Location: San Diego, CA USA

Re: Label/Button onAction() and onDoubleClick() Both Fire wh

Postby ROCLASI » Fri May 06, 2011 9:29 am

Hi Kim,

I don't think this is expected behavior. Or at least (in my book) it should not be.
When a label has also an onDoubleClick then the onAction should wait for x milliseconds before it triggers (unless a second click was detected). At least that's how I think it should work.

I suggest you file a bug report on this one.
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: Label/Button onAction() and onDoubleClick() Both Fire wh

Postby kwpsd » Fri May 06, 2011 10:26 pm

Hi, Robert.

Thanks for the feedback. I will generate a bug report as you suggested.

All the best!
Kim W. Premuda
San Diego, CA USA
User avatar
kwpsd
 
Posts: 687
Joined: Sat Jul 28, 2007 6:59 pm
Location: San Diego, CA USA

Re: Label/Button onAction() and onDoubleClick() Both Fire wh

Postby kwpsd » Tue May 10, 2011 7:18 pm

Reported:

Servoy case update (SVA:382884), onAction() and onDoubleClick() Both Fire on Double-Click

Resolution:
fixed in Servoy 6
Kim W. Premuda
San Diego, CA USA
User avatar
kwpsd
 
Posts: 687
Joined: Sat Jul 28, 2007 6:59 pm
Location: San Diego, CA USA


Return to Methods

Who is online

Users browsing this forum: Google [Bot] and 2 guests

cron