Page 1 of 1

Passing messages

Posted: Mon Nov 05, 2018 5:50 pm
by dunbarx
I thought I knew how these things worked/

In a new stack I have the following handler in the stack script:

Code: Select all

on mouseStillDown
   if the optionKey is down then   answer the ticks
end mouseStillDown
The dictionary states that the "mouseStillDown" message is sent to the card if no underlying control is under the cursor. But I get no message in the stack handler. If I place a "mouseStillDown" handler in the card script that merely passes that message, then the stack script handler will fire.

Why doesn't the message automatically go to the stack? Why do I need to explicitly trap it on the card and send it along? What was that message passing "hierarchy" thing I heard so much about?

Oh, "mouseUp" works just fine that way. Always did.

This is HC 101, no?

Craig Newman

Re: Passing messages

Posted: Mon Nov 05, 2018 6:25 pm
by ClipArtGuy
I can confirm that this is not acting as expected in LC 9.01 on Ubuntu 18.04 (using the controlkey instead of optionkey, but otherwise the same script) It works in card script, but fails silently in stack script.

Re: Passing messages

Posted: Mon Nov 05, 2018 7:00 pm
by jmburnod
Same results LC 9.0.1, OS X 10.13
Jean-Marc

Re: Passing messages

Posted: Mon Nov 05, 2018 7:42 pm
by dunbarx
I am in v. 8.1.10.

This drove me nuts, especially after my thread about one type of handler not being saved in a plug-in between sessions, whereas other handlers save just fine:

http://forums.livecode.com/viewtopic.php?f=9&t=31704

There is skepticism that the issue there is not with a particular handler (message) in the script, but rather with the plug-in itself.

I guess there are indeed such anomalies. I will send both to QCCl.

Craig