summaryrefslogtreecommitdiff
path: root/librelogo/source/LibreLogo/LibreLogo.py
diff options
context:
space:
mode:
Diffstat (limited to 'librelogo/source/LibreLogo/LibreLogo.py')
-rw-r--r--librelogo/source/LibreLogo/LibreLogo.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/librelogo/source/LibreLogo/LibreLogo.py b/librelogo/source/LibreLogo/LibreLogo.py
index 626c5d210f09..103b6061244e 100644
--- a/librelogo/source/LibreLogo/LibreLogo.py
+++ b/librelogo/source/LibreLogo/LibreLogo.py
@@ -303,10 +303,13 @@ def Input(s):
if inputtext:
inputtext = e.Text
else:
+ # Cancel button
__halt__ = True
# dispose the dialog
controlContainer.dispose()
+ # stop program at pressing Cancel
+ __checkhalt__()
return inputtext
except Exception:
__trace__()
@@ -333,7 +336,9 @@ def Print(s):
global __halt__
s = __string__(s, _.decimal)
if not MessageBox(_.doc.CurrentController.Frame.ContainerWindow, s[:500] + s[500:5000].replace('\n', ' '), "", "messbox", __OK_CANCEL__):
+ # stop program at pressing Cancel
__halt__ = True
+ __checkhalt__()
def MessageBox(parent, message, title, msgtype = "messbox", buttons = __OK__):
msgtypes = ("messbox", "infobox", "errorbox", "warningbox", "querybox")