Passing mouse clicks up the object heirarchy
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- VIP Livecode Opensource Backer
- Posts: 10044
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Passing mouse clicks up the object heirarchy
If you have a message you want ignored in any object, the object's script can trap messages and take no action and not pass them.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Passing mouse clicks up the object heirarchy
I'm sure that's what he meant, or would have meant if he'd thought a moment. I understand his point of view, new users would likely be confused if they checked a disabled box and nothing visually changed. The behavior of images isn't like the disabled behavior of other controls either.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Passing mouse clicks up the object heirarchy
Purple, the answer is always purple...except when it is green....

-
- Livecode Opensource Backer
- Posts: 10090
- Joined: Fri Feb 19, 2010 10:17 am
Re: Passing mouse clicks up the object heirarchy
Richard
Craig
Um, no. The trapping, taking no action and not passing a message is not the same as ignoring it. A disabled control ignores messages. A control with:If you have a message you want ignored in any object, the object's script can trap messages and take no action and not pass them
buries messages.on mouseUp
end mouseUp
Craig
-
- VIP Livecode Opensource Backer
- Posts: 10044
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Passing mouse clicks up the object heirarchy
Good linguistic analysis.dunbarx wrote: ↑Sat Jul 11, 2020 3:22 amRichardUm, no. The trapping, taking no action and not passing a message is not the same as ignoring it. A disabled control ignores messages. A control with:If you have a message you want ignored in any object, the object's script can trap messages and take no action and not pass themburies messages.on mouseUp
end mouseUp
Same result.
I'll try to choose my words more carefully.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Passing mouse clicks up the object heirarchy
Just to stir up more mud in the water (sorry turtles), I seem to remember a discussion that mentioned sort of "queuing" messages, and formerly disabled controls responding to the queued messages on being re-enabled after they had been sent.
But that seemed to be due to a "wait" being in effect, in essence the message was attached to the turtle but the turtle was not allowed into the water until after the wait period was over, meaning that by the time the turtle got to the trap, it was re-enabled again.
viewtopic.php?p=150017#p150017
But that seemed to be due to a "wait" being in effect, in essence the message was attached to the turtle but the turtle was not allowed into the water until after the wait period was over, meaning that by the time the turtle got to the trap, it was re-enabled again.
viewtopic.php?p=150017#p150017
-
- VIP Livecode Opensource Backer
- Posts: 366
- Joined: Mon Jun 10, 2013 1:32 pm
Re: Passing mouse clicks up the object heirarchy
FourthWorld wrote: ↑Thu Jul 09, 2020 6:53 pmI belong to no political party, hold the same respect for all churches, and even treat left-handed people as I would right-handed.
But on this most important matter I take my stand: messages fall downward.
Yes, this is the hill I'm prepared to die on.![]()
I stand with Terry and Richard on the Hill - but I was going to use Parent & Child and then I remembered we might not be able to use that like Master & Slave when talking about computers for crying out loud)
cogito ergo sum
I think therefore I am ... I'm Pink therefore I'm Spam (must brush up on my Latin).
Translated with a Latin to Hungarian dictionary and then Hungarian to to English dictionary - I didn't have a Latin to English dictionary.
(If you are not into Monty Python well .... https://www.youtube.com/watch?v=YSlHnSzFLBw )
Lagi
Re: Passing mouse clicks up the object heirarchy
We will soon tire of this. We always do. But generally there is value and fun along the way.
But,
Nope. If you click on an object that is disabled, the message likely passes into the card. If you click on an object with a handler as above, the message is stopped, frisked and killed.
It is very different; it therefore matters. It is also likely a matter of words, not ideas, at least in the most recent part of this thread.
Craig
But,
Thank you.Good linguistic analysis.
Same result.
Nope. If you click on an object that is disabled, the message likely passes into the card. If you click on an object with a handler as above, the message is stopped, frisked and killed.
It is very different; it therefore matters. It is also likely a matter of words, not ideas, at least in the most recent part of this thread.
Craig
-
- Livecode Opensource Backer
- Posts: 10090
- Joined: Fri Feb 19, 2010 10:17 am
Re: Passing mouse clicks up the object heirarchy
I am having trouble working out if I am a slave to my computers, or my computers are my slaves.I remembered we might not be able to use that like Master & Slave when talking about computers
Oh, well, I think I'll just go and park some cars,
while you try and spice up the, frankly, slightly bland semantic soup.
-
-
- VIP Livecode Opensource Backer
- Posts: 10044
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Passing mouse clicks up the object heirarchy
...except with image objects, which is the subject of this thread. So next time I'll be more specific with my wording.
In fact, neither disabling the object nor blocking the message will by itself do what Richmond is asking for, since he's not asking for the message to go to the card, but to a control beneath the target. There is no property for that. A handler is needed.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Passing mouse clicks up the object heirarchy
A disabled image will allow the control under it to receive the mouse message. Actually I just tried it with a disabled button and a disabled field and they also allows mouseclicks to trigger the object under it. Interesting. Maybe they all do.FourthWorld wrote: ↑Sat Jul 11, 2020 6:23 pm...except with image objects, which is the subject of this thread. So next time I'll be more specific with my wording.
In fact, neither disabling the object nor blocking the message will by itself do what Richmond is asking for, since he's not asking for the message to go to the card, but to a control beneath the target. There is no property for that. A handler is needed.
Images are the only controls I know of that don't change their appearance when disabled, though.
Here's a screenshot of my test. While the green circle looks normal, it's actually a disabled image. The button and label field are disabled, which you can see. The blue rectangle is not disabled. Each object has a script that puts its name into the message box. If I click on a disabled control in the area overlapping the rectangle, the target responds it is the rectangle. If I click the same object outside the blue area, the target is the card.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Passing mouse clicks up the object heirarchy
Jacque.
This is now expected behavior, no? You were the one who pointed this out. The only thing that threw me initially was I did not know that images remained intact when disabled. As Richard said, Richmond did not need images NOT to trap messages, but rather that a specific image carry the load.
Having the card be the final recipient as the message went upwards (hmph, ahem) would have made that simple.
Too many ways to skin the cat
Craig
This is now expected behavior, no? You were the one who pointed this out. The only thing that threw me initially was I did not know that images remained intact when disabled. As Richard said, Richmond did not need images NOT to trap messages, but rather that a specific image carry the load.
Having the card be the final recipient as the message went upwards (hmph, ahem) would have made that simple.
Too many ways to skin the cat
Craig
-
- Livecode Opensource Backer
- Posts: 10090
- Joined: Fri Feb 19, 2010 10:17 am
Re: Passing mouse clicks up the object heirarchy
Right from the coo's gab:
- -
The reason I DO NOT want to use DISABLED is because while I want mouseUp
to be picked up by something in a layer with a lower number than the 'floating' image
I still want the 'floating' image to be able to pick up other signals, like this:
- -
The reason I DO NOT want to use DISABLED is because while I want mouseUp
to be picked up by something in a layer with a lower number than the 'floating' image
I still want the 'floating' image to be able to pick up other signals, like this:
Code: Select all
on mouseUp
send mouseUp to img "thingBelowMe"
end mouseUp
on mouseEnter
put "Cheese"
end mouseEnter
Re: Passing mouse clicks up the object heirarchy
Richmond.
First time I heard about this other functionality.
So go explicit. Enable all. Group the overlying images so you only have to write one handler, except for the "working" image.
Craig
First time I heard about this other functionality.
So go explicit. Enable all. Group the overlying images so you only have to write one handler, except for the "working" image.
Craig