easycoder 250720.1__py2.py3-none-any.whl → 250721.1__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of easycoder might be problematic. Click here for more details.

easycoder/__init__.py CHANGED
@@ -9,4 +9,4 @@ from .ec_program import *
9
9
  from .ec_timestamp import *
10
10
  from .ec_value import *
11
11
 
12
- __version__ = "250720.1"
12
+ __version__ = "250721.1"
easycoder/ec_pyside.py CHANGED
@@ -323,14 +323,17 @@ class Graphics(Handler):
323
323
  else: command['window'] = None
324
324
  title = ''
325
325
  while True:
326
- if self.peek() == 'title':
326
+ if self.peek() == 'type':
327
+ self.nextToken()
328
+ command['type'] = self.nextToken()
329
+ elif self.peek() == 'title':
327
330
  self.nextToken()
328
331
  title = self.nextValue()
329
- elif self.peek() == 'type':
332
+ elif self.peek() == 'prompt':
330
333
  self.nextToken()
331
- command['type'] = self.nextToken()
334
+ command['prompt'] = self.nextValue()
332
335
  else: break
333
- command['title'] = title
336
+ command['title'] = self.compileConstant(title)
334
337
  self.add(command)
335
338
  return True
336
339
 
@@ -465,8 +468,11 @@ class Graphics(Handler):
465
468
  mainLayout = QVBoxLayout(dialog)
466
469
  dialog.setWindowTitle(self.getRuntimeValue(command['title']))
467
470
  dialogType = command['type']
468
- if dialogType in ['lineinput']:
469
- if dialogType == 'lineinput':
471
+ dialog.dialogType = dialogType
472
+ if dialogType in ['confirm', 'lineEdit']:
473
+ if dialogType == 'confirm':
474
+ mainLayout.addWidget(QLabel(self.getRuntimeValue(command['prompt'])))
475
+ elif dialogType == 'lineinput':
470
476
  dialog.lineEdit = QLineEdit(dialog)
471
477
  mainLayout.addWidget(dialog.lineEdit)
472
478
  buttonBox = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel, dialog)
@@ -476,7 +482,7 @@ class Graphics(Handler):
476
482
  record['dialog'] = dialog
477
483
  return self.nextPC()
478
484
 
479
- # Creates a message box but doesn'r run it
485
+ # Creates a message box but doesn't run it
480
486
  def r_createMessageBox(self, command, record):
481
487
  data = {}
482
488
  data['window'] = command['window']
@@ -952,7 +958,12 @@ class Graphics(Handler):
952
958
  elif 'dialog' in command:
953
959
  record = self.getVariable(command['dialog'])
954
960
  dialog = record['dialog']
955
- record['result'] = dialog.exec()
961
+ if dialog.dialogType == 'confirm':
962
+ record['result'] = True if dialog.exec() == QDialog.Accepted else False
963
+ elif dialog.dialogType == 'lineinput':
964
+ if dialog.exec() == QDialog.Accepted:
965
+ record['result'] = dialog.lineEdit.text()
966
+ else: return ''
956
967
  return self.nextPC()
957
968
 
958
969
  # Start the graphics
@@ -1072,8 +1083,7 @@ class Graphics(Handler):
1072
1083
  v['content'] = content
1073
1084
  return v
1074
1085
  elif keyword == 'dialog':
1075
- dialog = symbolRecord['dialog']
1076
- content = dialog.lineEdit.text() if symbolRecord['result'] == QDialog.Accepted else ''
1086
+ content = symbolRecord['result']
1077
1087
  v = {}
1078
1088
  v['type'] = 'text'
1079
1089
  v['content'] = content
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: easycoder
3
- Version: 250720.1
3
+ Version: 250721.1
4
4
  Summary: Rapid scripting in English
5
5
  Keywords: compiler,scripting,prototyping,programming,coding,python,low code,hypertalk,computer language,learn to code
6
6
  Author-email: Graham Trott <gtanyware@gmail.com>
@@ -1,16 +1,16 @@
1
1
  easycoder/README.md,sha256=BVXmYphcTJ6q6RN_9L6HtQukgCnOjSLVIsTM3lk-9aM,587
2
- easycoder/__init__.py,sha256=9MLtBGf5N9Fl4wsYvxaoJmrBI6ijgHGn1RYXOT8fDH8,262
2
+ easycoder/__init__.py,sha256=xAuCHNIDNn3RDSa_sEh8fW65cAHRYorwbRdWuSv1M34,262
3
3
  easycoder/ec_classes.py,sha256=PWPaJuTfaWD4-tgT-2WWOgeFV_jXxlxyKCxvXyylCUU,1824
4
4
  easycoder/ec_compiler.py,sha256=9byLqJZgMHAyFFyD8eGhY77oTsY1GY1aVcVrU4JAbd4,5287
5
5
  easycoder/ec_condition.py,sha256=YXvSBQKEzKGCcgUGo3Qp8iHolXmm2BpEm0NimSDszIM,785
6
6
  easycoder/ec_core.py,sha256=he_8KO2lSR9vcj9_2jauBBvwE2QqkeSVDEcagHdVnHU,99575
7
7
  easycoder/ec_handler.py,sha256=ohf3xUuWw_Qb5SZnulGtDhvCb11kvWtYfgbQTiOXpIY,2261
8
8
  easycoder/ec_program.py,sha256=FxM9I3Wu1sXBkM5byaKjXyu0MGiILSaa_VeAtuw1g9Q,10091
9
- easycoder/ec_pyside.py,sha256=ELqG95R8zcYcxCGgb0pD3GTmpS9NhXYgE2UejeYlO0c,40695
9
+ easycoder/ec_pyside.py,sha256=q-6amHVMM12fUOASnsXJvTWcWPElCRSDk_yAMfe2PsA,41214
10
10
  easycoder/ec_timestamp.py,sha256=myQnnF-mT31_1dpQKv2VEAu4BCcbypvMdzq7_DUi1xc,277
11
11
  easycoder/ec_value.py,sha256=zgDJTJhIg3yOvmnnKIfccIizmIhGbtvL_ghLTL1T5fg,2516
12
- easycoder-250720.1.dist-info/entry_points.txt,sha256=JXAZbenl0TnsIft2FcGJbJ-4qoztVu2FuT8PFmWFexM,44
13
- easycoder-250720.1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
14
- easycoder-250720.1.dist-info/WHEEL,sha256=Dyt6SBfaasWElUrURkknVFAZDHSTwxg3PaTza7RSbkY,100
15
- easycoder-250720.1.dist-info/METADATA,sha256=1FuWZsBJulk-uA_xNK_4Lv-t3eJdM5BLq8Yc_uggG8w,6897
16
- easycoder-250720.1.dist-info/RECORD,,
12
+ easycoder-250721.1.dist-info/entry_points.txt,sha256=JXAZbenl0TnsIft2FcGJbJ-4qoztVu2FuT8PFmWFexM,44
13
+ easycoder-250721.1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
14
+ easycoder-250721.1.dist-info/WHEEL,sha256=Dyt6SBfaasWElUrURkknVFAZDHSTwxg3PaTza7RSbkY,100
15
+ easycoder-250721.1.dist-info/METADATA,sha256=_Wt7tdXZbeRQpqu2HCAYKuOLk804iby__NCgV6m2jgk,6897
16
+ easycoder-250721.1.dist-info/RECORD,,