Skip to content

Commit 08a5708

Browse files
committed
250517.1
1 parent 10eb23d commit 08a5708

32 files changed

+251
-931
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
*/__pycache__/*
2+
*.code-workspace
3+
*.py
4+
*.ecs
-39.8 KB
Binary file not shown.
39.9 KB
Binary file not shown.
Binary file not shown.

easycoder/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99
from .ec_timestamp import *
1010
from .ec_value import *
1111

12-
__version__ = "250508.2"
12+
__version__ = "250517.1"

easycoder/ec_core.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import json, math, hashlib, threading, os, subprocess, sys, requests, time, numbers, base64, binascii, random
1+
import json, math, hashlib, threading, os, subprocess, sys, time, numbers, base64, binascii, random, requests
22
from psutil import Process
3-
from datetime import datetime, timezone
3+
from datetime import datetime
44
from random import randrange
55
from .ec_classes import FatalError, RuntimeWarning, RuntimeError, AssertionError, NoValueError, NoValueRuntimeError, Condition, Object
66
from .ec_handler import Handler
@@ -381,7 +381,7 @@ def k_exit(self, command):
381381

382382
def r_exit(self, command):
383383
if self.program.graphics != None:
384-
self.program.graphics.force_exit()
384+
self.program.graphics.force_exit(None)
385385
return -1
386386

387387
# Declare a file variable

easycoder/ec_pyside.py

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -386,9 +386,13 @@ def r_createWindow(self, command, record):
386386
if y == None: y = (self.screenHeight - h) / 2
387387
else: y = self.getRuntimeValue(x)
388388
window.setGeometry(x, y, w, h)
389-
container = QWidget()
390-
container.setLayout(self.getVariable(command['layout'])['widget'])
391-
window.setCentralWidget(container)
389+
# content = self.getVariable(command['layout'])['widget']
390+
# if isinstance(content, QWidget):
391+
# container = content
392+
# else:
393+
# container = QWidget()
394+
# container.setLayout(content)
395+
# window.setCentralWidget(container)
392396
record['window'] = window
393397
return self.nextPC()
394398

@@ -712,6 +716,7 @@ def r_select(self, command):
712716
return self.nextPC()
713717

714718
# set [the] width/height [of] {widget} [to] {value}
719+
# set [the] layout of {window} to {layout}
715720
# set [the] text [of] {label}/{button}/{lineinput} [to] {text}
716721
# set [the] color [of] {label}/{button}/{lineinput} [to] {color}
717722
# set [the] state [of] {checkbox} [to] {color}
@@ -730,6 +735,18 @@ def k_set(self, command):
730735
command['value'] = self.nextValue()
731736
self.add(command)
732737
return True
738+
elif token == 'layout':
739+
self.skip('of')
740+
if self.nextIsSymbol():
741+
record = self.getSymbolRecord()
742+
if record['keyword'] == 'window':
743+
command['name'] = record['name']
744+
self.skip('to')
745+
if self.nextIsSymbol():
746+
record = self.getSymbolRecord()
747+
command['layout'] = record['name']
748+
self.add(command)
749+
return True
733750
elif token == 'text':
734751
self.skip('of')
735752
if self.nextIsSymbol():
@@ -790,6 +807,13 @@ def r_set(self, command):
790807
elif what == 'width':
791808
widget = self.getVariable(command['name'])['widget']
792809
widget.setFixedWidth(self.getRuntimeValue(command['value']))
810+
elif what == 'layout':
811+
window = self.getVariable(command['name'])['window']
812+
layout = self.getVariable(command['layout'])
813+
content = self.getVariable(command['layout'])['widget']
814+
container = QWidget()
815+
container.setLayout(content)
816+
window.setCentralWidget(container)
793817
elif what == 'text':
794818
record = self.getVariable(command['name'])
795819
widget = self.getVariable(command['name'])['widget']

plugins/keyboards/4-function.json

Lines changed: 0 additions & 62 deletions
This file was deleted.

plugins/keyboards/4-function.png

-114 KB
Binary file not shown.

plugins/keyboards/qwerty-0.json

Lines changed: 0 additions & 179 deletions
This file was deleted.

0 commit comments

Comments
 (0)