Page 3 of 4

Re: Passing mouse clicks up the object heirarchy

Posted: Fri Jul 10, 2020 5:11 pm
by FourthWorld
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.

Re: Passing mouse clicks up the object heirarchy

Posted: Fri Jul 10, 2020 5:18 pm
by jacque
richmond62 wrote: Fri Jul 10, 2020 4:18 pm
dunbarx wrote: Fri Jul 10, 2020 4:00 pm Perhaps Panos slightly misused "blocks" when he meant "ignores"?

Craig
I hope so.
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.

Re: Passing mouse clicks up the object heirarchy

Posted: Fri Jul 10, 2020 5:27 pm
by bogs
Purple, the answer is always purple...except when it is green....

Re: Passing mouse clicks up the object heirarchy

Posted: Fri Jul 10, 2020 7:09 pm
by richmond62
All my tomato plants are grue:

https://youtu.be/1rUCyg4Ppso

Re: Passing mouse clicks up the object heirarchy

Posted: Sat Jul 11, 2020 3:22 am
by dunbarx
Richard
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
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:
on mouseUp
end mouseUp
buries messages.

Craig

Re: Passing mouse clicks up the object heirarchy

Posted: Sat Jul 11, 2020 4:12 am
by FourthWorld
dunbarx wrote: Sat Jul 11, 2020 3:22 am Richard
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
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:
on mouseUp
end mouseUp
buries messages.
Good linguistic analysis.

Same result.

I'll try to choose my words more carefully.

Re: Passing mouse clicks up the object heirarchy

Posted: Sat Jul 11, 2020 9:12 am
by SparkOut
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

Re: Passing mouse clicks up the object heirarchy

Posted: Sat Jul 11, 2020 2:28 pm
by Lagi Pittas
FourthWorld wrote: Thu Jul 09, 2020 6:53 pm I 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

Posted: Sat Jul 11, 2020 3:17 pm
by dunbarx
We will soon tire of this. We always do. But generally there is value and fun along the way.

But,
Good linguistic analysis.

Same result.
Thank you.

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

Re: Passing mouse clicks up the object heirarchy

Posted: Sat Jul 11, 2020 4:28 pm
by richmond62
I remembered we might not be able to use that like Master & Slave when talking about computers
I am having trouble working out if I am a slave to my computers, or my computers are my slaves.

Oh, well, I think I'll just go and park some cars,
while you try and spice up the, frankly, slightly bland semantic soup.
-
Marvin.jpg
Marvin.jpg (14.5 KiB) Viewed 9869 times

Re: Passing mouse clicks up the object heirarchy

Posted: Sat Jul 11, 2020 6:23 pm
by FourthWorld
dunbarx wrote: Sat Jul 11, 2020 3:17 pm We will soon tire of this. We always do. But generally there is value and fun along the way.

But,
Good linguistic analysis.

Same result.
Thank you.

Nope. If you click on an object that is disabled, the message likely passes into the card...
...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.

Re: Passing mouse clicks up the object heirarchy

Posted: Sat Jul 11, 2020 7:28 pm
by jacque
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.
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.

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.

Re: Passing mouse clicks up the object heirarchy

Posted: Sat Jul 11, 2020 8:10 pm
by dunbarx
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

Re: Passing mouse clicks up the object heirarchy

Posted: Sat Jul 11, 2020 8:52 pm
by richmond62
Right from the coo's gab:
-
cow-scot-mountain-wild-ginger-herbivore-animal.jpg
-

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

Posted: Sat Jul 11, 2020 9:33 pm
by dunbarx
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