List Field Not receiving Mouse messages unless a line is clicked?
dunbarx at aol.com
dunbarx at aol.com
Mon Apr 25 14:04:40 EDT 2016
Confirmed here, and there is nothing in the v6 dictionary that indicates that the click must occur on a non-empty line to fire the messages.
This is a bug, not a feature, since it is easy to determine if a line is empty if there is a message sent, and act accordingly, but difficult to do so if there is not.
I never noticed this before.
Craig Newman
-----Original Message-----
From: Sannyasin Brahmanathaswami <brahma at hindu.org>
To: How LiveCode <use-livecode at lists.runrev.com>
Sent: Mon, Apr 25, 2016 1:52 pm
Subject: List Field Not receiving Mouse messages unless a line is clicked?
I was trying to find a way to force a list field to unhilite it’s line.
The instinctive behavior would be to just click away from any lines below the list and then any hilited line in the list would be unhilited. But my handler doesn’t fire if I click anywhere in the field that is not on a line.
Try this yourself
Create a scrolling list field. The IDE will prepopulated with choice 1, 2, 3 (lines)
Make the field bigger so there is space below those three lines
Add this to the script of the field:
on mousedown
put the hilitedtext
end mousedown
on mouseup
answer "hello" with "OK"
end mouseup
Note that the mouseup message triggers the answer dialog only if you click on a line.
If you click on the field below.. .nothing happens.
This seems to be a bug to me… since the mouseUP is in the script of the field… the field show hear it whether or not a line is clicked.
BR
_______________________________________________use-livecode mailing listuse-livecode at lists.runrev.comlivecode@lists.runrev.comPlease visit this url to subscribe, unsubscribe and manage your subscription preferences:http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list