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

Mark Schonewille m.schonewille at economy-x-talk.com
Mon Apr 25 14:24:25 EDT 2016


I also consider this a bug, but it has always been like in 
Revolution/MetaCard.

You may solve this problem by using mouseDown messages or by setting the 
lockText to true. This isn't always a good solution, but it is worth a try.

I think it is like this because list fields normally should respond only 
to changes in the selection and often a different button just retrieves 
the selected line while the list field itself doesn't need to do anything.

Still, I vaguely remember being surprised when I moved from HyperCard to 
Revolution and I think both mouseUp and mouseDown should be triggered.

Kind regards,

Mark Schonewille
http://economy-x-talk.com
https://www.facebook.com/marksch

Buy the most extensive book on the
LiveCode language:
http://livecodebeginner.economy-x-talk.com

Op 25-Apr-16 om 20:04 schreef dunbarx at aol.com:
> 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
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please 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