lock screen gotcha revisited
J. Landman Gay
jacque at hyperactivesw.com
Mon Aug 21 19:13:48 EDT 2017
On 8/21/17 5:47 PM, prothero--- via use-livecode wrote:
> I didn't realize that the lockscreen command only applied to the handler that sets it.
No, it doesn't (or shouldn't) apply only to the handler that sets it.
> Does this mean that each script has to set lockscreen if it needs it?
It's a global lock until either a handler unlocks the screen or an idle
occurs. The engine automatically unlocks when it does housekeeping.
> I am not arguing the current system be changed though, but for me, my suggestion is way more intuitive. Trying to keep track of the lockscreen count seems prone to errors.
You don't need to keep a count (or shouldn't need to.) It's all internal
and generally it works well. Lock the screen when you need it, unlock
when you want to redraw the screen, and if you forget to unlock then the
engine will do it for you when the next idle occurs.
The only issue I've found (and still need to verify) is that unlocking
with a visual effect can override the expected behavior, which is to
keep the lock on either until you unlock it or no handlers are running.
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the Use-livecode