Groups in the message path: Trapping Mouseup

Paul Dupuis paul at researchware.com
Mon Dec 9 09:52:56 EST 2019


I use groups in use cases where I want a on mouseDown script in the 
group to respond to any mouse click anywhere in the rect of the group, 
so, no, groups should not ONLY respond to mouse messages passed though 
object contained in the group


If you have groups where you need to pass a mouseDown (or mosueWhatever) 
mesage to the card or stack, just add a behavior to the group for a 
script that contain handlers like

on mouseDown
   pass mouseDown
end mouseDown

on mouseUp
   pass mouseUp
end mouseUp

Although if there is no handler for the mouse event it should pass to 
the card and then the stack and then any library or backscripts and then 
the engine.

  On 12/9/2019 9:30 AM, Sannyasin Brahmanathaswami via use-livecode wrote:
> In this use case,
>
> - the button "starWidget"  is a "standalone" button on an independent layer on the card  and not a part of any group
> -- @Jacque... the groups that are trapping the mouseup I are background groups using on various card.
>   
> Mark Weider says "A background group will definitely get the message before the stack
> script does. Also any script being used as a behavior."
>
> BR: is this "really" expected behavior? gosh, I hope not! "Encapsulation"would mean
>
> -- background groups: "encapsulated" only receive mouse/touch events from objects that are contain in "itself" --  group
> -- behaviors: "encapsulated": only receive mouse events for the object or group the behavior is assigned to.
>
> Isn't this a bug?  Otherwise, "We have chaos on the Highway 666, total car wreck on the Message Path"
>
> _______________________________________________
> 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