Lock screen and animated gif
Paul Dupuis
paul at researchware.com
Tue Dec 20 10:48:41 EST 2022
I'm just using this post to raise awareness on the list (if anyone
reading this doesn't know this already)
When using 'wait 0 with messages' any messages in the pendingMessages
(who are not delayed in time) get processed. This includes (potentially)
user clicks (mouseDown and mosueUp events). In a multi-window
application, this can be a click on another window, changing the
defaultSTack. If the original script with the 'wait 0 with messages'
does not use fully qualified object references, script execution errors
can result. Example:
You have a script in a button on Stack/Window X that have the following
lines:
wait 0 with messages
put tData into fld "MyData"
vs
wait 0 with messages
put tData into fld "MyData" of stack "X"
In the first case, if the user had previously click on Window/Stack Y,
that mouse action would make Stack Y the defaultStack and line 2 of the
first exampel would generate an error (unless stack Y ALSO has a field
called "MyData"
In the second example the script would still work since the field
"MyData" object reference is not dependent upon the defaultStack being
stack "X"
In mobile (single windows) and desktop app that have a single
window/stack this is generally not an issue. But in multi-window desktop
apps in LC, not fully qualifying object references can really cause
problems when using wait with messages
On 12/20/2022 10:18 AM, bob--- via use-livecode wrote:
> I find to get the spinner to rotate you need to add a wait with messages statement into loops somewhere.
>
> wait 0 seconds with messages
>
> Give it a try and see if that gets it spinning.
>
> - Bob Hall
>
>
More information about the use-livecode
mailing list