Passing messages

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9578
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Passing messages

Post by dunbarx » Mon Nov 05, 2018 5:50 pm

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

ClipArtGuy
Posts: 253
Joined: Wed Aug 19, 2015 4:29 pm

Re: Passing messages

Post by ClipArtGuy » Mon Nov 05, 2018 6:25 pm

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.

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2718
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

Re: Passing messages

Post by jmburnod » Mon Nov 05, 2018 7:00 pm

Same results LC 9.0.1, OS X 10.13
Jean-Marc
https://alternatic.ch

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9578
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Passing messages

Post by dunbarx » Mon Nov 05, 2018 7:42 pm

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

Post Reply

Return to “Talking LiveCode”