Skip to content

Commit 1e5054d

Browse files
committed
v250116.4
1 parent 3c63cec commit 1e5054d

File tree

6 files changed

+15
-16
lines changed

6 files changed

+15
-16
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__ = "250116.3"
12+
__version__ = "250116.4"

easycoder/ec_graphics.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,9 @@ def k_add(self, command):
2727
elements.append(name)
2828
command['args'] = name
2929
else: FatalError(self.compiler.program, f'\'{name}\' is not a layout')
30-
elif token[0:2] == 'g_':
30+
else:
3131
command['type'] = token
3232
command['args'] = self.utils.getArgs(self)
33-
else: return False
3433
if self.nextIs('to'):
3534
if self.nextIsSymbol():
3635
symbolRecord = self.getSymbolRecord()

easycoder/ec_gutils.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ def getArgs(self, handler):
2121
# Get the default args for a graphic element
2222
def getDefaultArgs(self, type):
2323
args = {}
24-
if type == 'g_text':
24+
if type == 'Text':
2525
args['text'] = '(empty)'
2626
args['expand_x'] = False
27-
elif type == 'g_input':
27+
elif type == 'Input':
2828
args['key'] = None
2929
args['size'] = (None, None)
30-
elif type == 'g_button':
30+
elif type == 'Button':
3131
args['button_text'] = '(empty)'
3232
return args
3333

@@ -43,10 +43,10 @@ def decode(self, args, text):
4343

4444
# Create an element
4545
def createElement(self, type, args):
46-
if type == 'g_text': return psg.Text(text=args['text'], expand_x=args['expand_x'])
47-
elif type == 'g_input':
46+
if type == 'Text': return psg.Text(text=args['text'], expand_x=args['expand_x'])
47+
elif type == 'Input':
4848
size = args['size'].split()
4949
size = (size[0], size[1])
5050
return psg.Input(key=args['key'], size=size)
51-
elif type == 'g_button': return psg.Button(button_text=args['button_text'])
51+
elif type == 'Button': return psg.Button(button_text=args['button_text'])
5252
else: return None

scripts/testg.ecg

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@
1111
popup `Hello!`
1212
! debug step
1313

14-
set Row to g_text text `Date (YYYY-MM-DD):` and expand_x true
15-
add g_input key `-DATE-` and size `20 1` to Row
14+
set Row to Text text `Date (YYYY-MM-DD):` and expand_x true
15+
add Input key `-DATE-` and size `20 1` to Row
1616
add Row to Layout
1717

18-
set Row to g_text text `Time (HH:MM):` and expand_x true
19-
add g_input key `-TIME-` and size `20 1` to Row
18+
set Row to Text text `Time (HH:MM):` and expand_x true
19+
add Input key `-TIME-` and size `20 1` to Row
2020
add Row to Layout
2121

22-
set Row to g_text text `Your name:` and expand_x true
23-
add g_input key `-NAME-` and size `20 1` to Row
22+
set Row to Text text `Your name:` and expand_x true
23+
add Input key `-NAME-` and size `20 1` to Row
2424
add Row to Layout
2525

26-
set Row to g_button button_text `Click me`
26+
set Row to Button button_text `Click me`
2727
add Row to Layout
2828

2929
create Window `Graphics Test`

0 commit comments

Comments
 (0)