Does Rev using blocking (synchronous) messaging?
Just debugged a piece of code that sends a mouseUp to a button before doing a few more things. I had accidentally disabled the button and then the code after the send did not get executed anymore....
TIA,
Kai
Synchronous messaging?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Dear Kai,
You mention two different things here. Synchronous messaging and disabled buttons not executing code. Disabled objects don't execute code when they receive messages. Period.
There are different ways to send a message to another object. If you send a message immediately, it gets executed immediately.
If you send a message in 0 millisecs, it is executed right after all currently running handlers have finished, unless one of these handlers contain a "wait with messages" or "repeat with messages" statement.
In the case of a wait or repeat with messages, the message sent to another object will get executed while other handlers wait.
Best,
Mark
You mention two different things here. Synchronous messaging and disabled buttons not executing code. Disabled objects don't execute code when they receive messages. Period.
There are different ways to send a message to another object. If you send a message immediately, it gets executed immediately.
Code: Select all
send "foo" to btn "bar"
Code: Select all
send "foo" to btn "bar" in 0 millisecs
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Hi Kai,
This morning I have been testing my own theory, and guess what... I am wrong. Even if a button is disabled, its script still runs. Everything else, with regard to messages being sent directly or after a handler has finished, is still correct.
This leads me to the conclusion that there is an error in one of your scripts, assuming that no Revolution bug is involved. Could you post the relevant scripts?
Best,
Mark
This morning I have been testing my own theory, and guess what... I am wrong. Even if a button is disabled, its script still runs. Everything else, with regard to messages being sent directly or after a handler has finished, is still correct.
This leads me to the conclusion that there is an error in one of your scripts, assuming that no Revolution bug is involved. Could you post the relevant scripts?
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode