anmldr wrote: ↑Fri Jun 05, 2020 9:32 pm
I don't have "pass mouseUp" in the card or button scripts. That is what I was trying to avoid. This will only be used during development. So, I wanted the scripts to be only in one place so that I can delete them or comment them out later.
Yes, I think maybe I wasn't as clear as I could have been.
I'll try again
When you have a button or other object that doesn't have a script attached to it, the message that would normally be acted upon moves down the message path to the next object that it might act upon, until (if it doesn't hit anything else) it reaches the main stack.
As an example, let us say you have a stack, card, and button (keeping this simple). Your button has no 'mouseUp' handler script, but your card does. When you click on the button, without any script at all in it, the mouseUp will trigger on the card.
To further this example, your button and card have no mouseUp script, but the stack does (like the one I posted above). You click the button, the message looks at the script on the card, doesn't see a handler for mouseUp, and moves down to the stack where it is handled by the script I showed you. All of this is done without putting 'pass mouseUp' anywhere either in the buttton, or the card.
To complete this example, any button you *have* a script in, the mouseUp will trigger in that button and, unless you specifically put 'pass mouseUp', that is where it will stop.
So, to satisfy your goal of wanting any buttons that don't have a script in their object naming itself when you click on it, you would put the script I wrote above (or one like it) in the stack script. Buttons that have scripts will fire the scripts you wrote, and buttons that have no script will tell you their names.
I hope that clarifies it for you.