Skip to content

Commit c575efb

Browse files
committed
250317.1
1 parent ab8cd06 commit c575efb

File tree

6 files changed

+9
-6
lines changed

6 files changed

+9
-6
lines changed
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__ = "250301.3"
12+
__version__ = "250317.1"

easycoder/ec_graphics.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,8 @@ def processItem(name, item):
151151
window = psg.Window(title, layout, finalize=True)
152152
record['window'] = window
153153
record['eventHandlers'] = {}
154-
self.program.windowRecord = record
155154
self.program.run(self.nextPC())
156-
self.mainLoop()
155+
self.mainLoop(record)
157156
return 0
158157

159158
def k_frame(self, command):
@@ -266,7 +265,8 @@ def k_set(self, command):
266265
def r_set(self, command):
267266
property = self.getRuntimeValue(command['property'])
268267
key = self.getRuntimeValue(command['key'])
269-
window = self.program.windowRecord['window']
268+
windowRecord = self.getVariable(command['window'])
269+
window = windowRecord['window']
270270
value = self.getRuntimeValue(command['value'])
271271
self.utils.updateProperty(window[key], property, value)
272272
return self.nextPC()
@@ -374,8 +374,7 @@ def compileCondition(self):
374374

375375
#############################################################################
376376
# The main loop
377-
def mainLoop(self):
378-
windowRecord = self.program.windowRecord
377+
def mainLoop(self, windowRecord):
379378
window = windowRecord['window']
380379
eventHandlers = windowRecord['eventHandlers']
381380
while True:

easycoder/ec_handler.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
class Handler:
44

55
def __init__(self, compiler):
6+
self.compiler = compiler
67
self.program = compiler.program
78
self.getToken = compiler.getToken
89
self.nextToken = compiler.nextToken

easycoder/ec_program.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,9 @@ def compare(self, value1, value2):
375375
if type(v2) == int:
376376
if type(v1) != int:
377377
v2 = f'{v2}'
378+
if type(v1) == dict and type(v2) == dict:
379+
v1 = json.dumps(v1)
380+
v2 = json.dumps(v2)
378381
if v1 > v2:
379382
return 1
380383
if v1 < v2:

0 commit comments

Comments
 (0)