Groups do not receive mouseEnter messages?

Devin Asay devin_asay at byu.edu
Tue Jun 25 13:50:14 EDT 2019


This is  a great idea, Paul. I was just thinking that might be a good solution, especially with the addition of the (relatively) new clipsToRect property of fields. When that property is true, a group’s boundaries do not automatically snap to the area defined by its child objects. Instead the group’s boundaries remain where the developer set them. Given that groups can now have an arbitrarily larger area than their child objects, it makes sense that we might want the option of treating them more like full-fledged objects than simply a container for other objects.

Devin


On Jun 25, 2019, at 11:30 AM, Paul Dupuis via use-livecode <use-livecode at lists.runrev.com<mailto:use-livecode at lists.runrev.com>> wrote:

There are clearly use cases where it makes sense for a group (such as it it just being used to contain or enclose a set of other controls) NOT to received mouse event messages.

There are also use cases where it DOES make sense of a group to received mouse event messages, such as if you are using a group as a drawing canvas.

Yes, wonderfully in Livecode, most things that can't be done one way, can be coded around to work another way.

I would suggest an enhancement to LiveCode to add a property to Groups that toggle between:

behave as a container: current group behavior regarding mouse event messages [default]
OR
behave as an object: cause the group to received mouse event message (and other routine object messages) following the usual rules (i.e. if there is a button in the group that has a mouseEnter handler it gets the message when the button is entered, but the group gets a message when it is entered, just as if you have a small button on top of a large button)

I don't know what to call the proposed property, and I certainly would not, at this time, prioritize it. I've submitted nearly 20 bugs in the last 60 days and I'd much rather see more of those fixed that a new feature added. That said, a property like this could be s solution for both use cases of groups.


_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com<mailto: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

Devin Asay
Director
Office of Digital Humanities
Brigham Young University



More information about the use-livecode mailing list