change py to js convert algorithm

This commit is contained in:
gitadmin committed 2018-08-08 22:15:37 +03:00
1 parent 3286b15441
commit feebd05e99
3 files changed
+72 -27

No files matched your search

+3 -2
View File
@@ -16,10 +16,11 @@ class MyApplication(cp.ExtApplication):
wnd = Ext.create('widget.window', {'title': 'My Window', 'width': 300, 'height': 250,
'items': [{'xtype': 'button', 'text': 'Click Here', 'handler': button_click}],
'buttons': [
{'text': 'OK', 'handler': js.FuncWithParams(ok_click, {'arg1': 1, 'arg2': 'val2'})},
{'text': 'Close', 'handler': str(js.function('this.up(\'window\').close()'))}]})
{'text': 'OK', 'handler': js.FuncWithParams(ok_click, {'arg1': 1, 'arg2': 'val2', 'arg3': js.cli.this.id})},
{'text': 'Close', 'handler': js.function('this.up(\'window\').close()')}]})
wnd.show()
wnd.setHeight(200)
print(repr(js.live_methods))
cp.THEME = 'classic'