Groups in the message path: Trapping Mouseup

Mark Wieder ahsoftware at sonic.net
Tue Dec 10 14:56:28 EST 2019


On 12/10/19 11:39 AM, Sannyasin Brahmanathaswami via use-livecode wrote:
> So then to trap "the target" in the stack script, require putting
>            pass mousedown (or mouseWhatever)
> in all the background groups (all of which contain their our MouseDown)
> 
> Correct?

Only if you want to handle the mouseUp message *first* in the background 
group script and *then* in the stack script.

> 
> remember the use case:
> we do not want and script in *any* button or top object that receives a click or touch.  The card becomes a pure "view" object.

Q: Why do you have a background group? And mouseUp handlers in it? This 
will catch any mouseUp messages that aren't already captured by controls 
on the card, and in addition will catch mouseUp messages if you click on 
the card itself.

Why not just have the mouseUp handler in the stack script?

Or put the buttons into their own (not background) group and have the 
mouseUp handler there?

Or have a behavior script for the buttons or group that handles the 
mouseUp messages?

-- 
  Mark Wieder
  ahsoftware at gmail.com




More information about the use-livecode mailing list