On Sep 1, 2014, at 3:50 PM, <[email protected]>
<[email protected]> 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
[email protected]
http://home.comcast.net/~pmbrig
_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode