how to detect mouse clicks into an editable field?

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
rozek
Posts: 151
Joined: Mon Jun 19, 2006 2:29 pm
Contact:

how to detect mouse clicks into an editable field?

Post by rozek » Thu Aug 14, 2008 3:40 pm

Hello!

Please excuse this silly question: how do I detect double clicks into an editable(!) text field? The "MouseDoubleUp/Down" messages are only sent to locked (i.e. non-editable) fields.

But how do I detect them on editable fields? (I have to modify the standard selection behaviour of fields in case of double clicks)

Thanks in advance for any hint!
Kind regards,

Andreas Rozek

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Thu Aug 14, 2008 5:04 pm

Hi Rozek,

The selectionChanged message is always sent to an editable field when the user clicks in it, even if the selection isn't changed.

Personally, I would consider this a bug, but in your case it might be a feature.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

rozek
Posts: 151
Joined: Mon Jun 19, 2006 2:29 pm
Contact:

Post by rozek » Fri Aug 15, 2008 2:44 pm

Hello Mark,

thanks for your response - I already feared that I would have to detect MouseClicks myself...

I wrote some code which is able to detect single mouse clicks within a field's text (but not outside it, e.g. beyond a given text line) and double clicks on blanks (but not - yet - printable text, where Revolution itself reacts on the double click)

Then I filed a bug report (#6905)

Now I am curious about the response from the staff at Revolution ;-)
Kind regards,

Andreas Rozek

Post Reply