List Field Not receiving Mouse messages unless a line is clicked?

Sannyasin Brahmanathaswami brahma at hindu.org
Mon Apr 25 13:51:12 EDT 2016


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


More information about the use-livecode mailing list