Constructions (Python) like
import time
while some_event is False:
time.sleep(1)
watching for some_event becoming True
have the drawback to freeze the LibreOffice
user interface.
While next (Basic) snippet
Do While Not some_event
Wait(1000)
does not.
The Python example prevents for waiting for events
that require user input,f.i. entering a value
in a cell.
The here proposed alternative is (Python):
basic = CreateScriptService('Basic')
while some_event is False:
basic.Wait(1000)
This works smoothly.
The Wait() method executes in the background
a Basic Wait statement.
This impacts only Python user scripts.
The change requires an update of the user
documentation.
Change-Id: Idb73907a5e27cf288310e306fb41c0aba9c8a388
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185137
Tested-by: Jenkins
Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>