Best Practice for updating the screen?

Paul Dupuis paul at
Tue May 23 11:05:00 EDT 2017

I find on many occasions that I am in the middle (or somewhere) in a
long handler and I want to update the screen and then continue.


on something
  lock screen
  ... bunches of code
  unlock screen
  wait 0 with messages -- generate a screen redraw/update to display
something (status message/icon/symbol/whatever
  lock screen
  ... more bunches of code
  unlock screen
end something

The problem with this approach is that other messages can get through in
addition to the OS redrawing the screen, such as an impatient user
generating key down or auto key or mouse events.

I realize I could use "flushEvents" before the "wait 0 with messages"
statement to clear any such impatient messages out, but is there a
better way?

Has LiveCode ever considered a "redraw screen" command or something like
that which lets the system have some free CPU cycles but without other
UI events getting processed?

Is there an enhancement request for such a feature in the LiveCode
bugzilla database?

Does anyone else run into this issue in their work?

What is the "best practice" for this issue?

More information about the use-livecode mailing list