how to stop mouse clicks from executing?
larry at significantplanet.org
larry at significantplanet.org
Tue Sep 2 10:20:03 EDT 2014
Hi Peter,
Thanks very much for the explanation.
Larry
----- Original Message -----
From: "Peter M. Brigham" <pmbrig at gmail.com>
To: "How to use LiveCode" <use-livecode at lists.runrev.com>
Sent: Tuesday, September 02, 2014 6:12 AM
Subject: Re: how to stop mouse clicks from executing?
> On Sep 1, 2014, at 3:50 PM, <larry at significantplanet.org>
> <larry at significantplanet.org> wrote:
>
>> Hi Paul,
>> As Richmond says, "That's a clever idea."
>> However, I have no understanding of what a frontScript is and no
>> understanding of how to trap those events.
>> Perhaps you'd be willing to elaborate for me?
>
> Create a button with the following script:
>
> on mousedown
> if <put your conditions here> then
> -- block mousedown
> else
> pass mousedown
> end if
> end mousedown
>
> on mouseup
> if <put your conditions here> then
> -- block mouseup
> else
> pass mouseup
> end if
> end mouseup
>
> Then in an openstack handler put the following line:
> insert script of btn "myFrontScript" into front
>
> A front script resides at the very front of the message path, and all
> messages will pass to it before going to any controls, cards, or stacks.
> Anything not handled by the frontscript will then pass to the normal
> message path. Any message blocked by the frontscript will stop there
> without getting passed. Frontscripts are very useful for handling special
> actions that must prevail everywhere in your stack.
>
> In most cases you will want to be sure to put the following in your
> closestack handler:
> remove script of btn "myFrontScript" from front
> to be sure that your blocking action does not persist when it is not
> needed.
>
> -- Peter
>
> Peter M. Brigham
> pmbrig at gmail.com
> http://home.comcast.net/~pmbrig
>
>
>
> _______________________________________________
> 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