Groups do not receive mouseEnter messages?

Ralph DiMola rdimola at evergreeninfo.net
Tue Jun 25 13:23:55 EDT 2019


This bit me a few times. I would have a group with some controls but was not able to get the mouseUp when you clicked in the group but not on any of the child controls. I now know I have to put some transparent object that fills the group and is also behind all the other controls. It never made any sense to me why this is. I thought as others that the group is a control and would get mouse messages. If this was so then the group would only get the message if 1) you clicked in the group but not on a child 2) You clicked in the group and on a child control and the control passed the message.

Ralph DiMola
IT Director
Evergreen Information Services
rdimola at evergreeninfo.net

-----Original Message-----
From: use-livecode [mailto:use-livecode-bounces at lists.runrev.com] On Behalf Of Devin Asay via use-livecode
Sent: Tuesday, June 25, 2019 12:48 PM
To: How to use LiveCode
Cc: Devin Asay
Subject: Re: Groups do not receive mouseEnter messages?

I have always thought of a group as a container object, like a card, but without a “canvas” that constitutes a part of the object. It’s always made sense to me that a group doesn’t get mouse messages, except as they are passed from child objects. If the group did get mouse click messages, it would complicate things in situations where you want to know which child object was clicked on.

A group of audio playback buttons, as it stands now:

on mouseUp
   play audioClip (the short name of the target) end mouseUp

A group of audio playback buttons, as it would be if the group received mouse click messages:

on mouseUp
   if the owner of me is not me then
      play audioClip (the short name of the target)
   end if
end mouseUp

So at least for most of my use cases, the current situation makes the most sense to me.

My $.02.

Devin

On Jun 25, 2019, at 9:24 AM, dunbarxx via use-livecode <use-livecode at lists.runrev.com<mailto:use-livecode at lists.runrev.com>> wrote:

I suppose as long as one knows how it works, it can be dealt with.

But there is an issue here, in that a group is not really a control, despite what the dictionary says. A group has a rect, and one can tell if the mouseLoc, say, is within that rect (and not necessarily within the rect of a child control), but one cannot rely on any "ordinary" LC thinking to hold at all.

I understand that a group is merely a group of controls. If it was a ghostLike object that only did that, then well and good.

But since it interacts with those controls intrinsically (as, for example, the way radio buttons behave "natively") and owns most "ordinary" control properties, well then, dammit, if one makes it opaque and green, it ought to respond to mouse events.

Craig



--
Sent from: http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

_______________________________________________
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

_______________________________________________
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