diff --git a/desktop/sources/index.html b/desktop/sources/index.html index 576fbff..c4d2875 100644 --- a/desktop/sources/index.html +++ b/desktop/sources/index.html @@ -40,6 +40,9 @@ ronin.controller.addRole('default', 'Edit', 'delete') ronin.controller.addRole('default', 'Edit', 'selectall') + + ronin.controller.add("default","Project","Run",() => { ronin.commander.run(); },"CmdOrCtrl+R"); + ronin.controller.commit(); ronin.install(document.body); diff --git a/desktop/sources/scripts/commander.js b/desktop/sources/scripts/commander.js index dcc2fc3..6b1a40b 100644 --- a/desktop/sources/scripts/commander.js +++ b/desktop/sources/scripts/commander.js @@ -32,10 +32,12 @@ function Commander (ronin) { this._status.textContent = 'Idle, RUN(cmd+enter).' this._input.focus() + this.run() } - this.run = function (txt = this.el.value) { - console.log(new Lisp(txt, ronin.library)) + this.run = function (txt = this._input.value) { + const inter = new Lisp(txt, ronin.library) + console.log(inter.toPixels()) } this.update = function () { diff --git a/desktop/sources/scripts/library.js b/desktop/sources/scripts/library.js index daa5c0a..8419e09 100644 --- a/desktop/sources/scripts/library.js +++ b/desktop/sources/scripts/library.js @@ -1,5 +1,5 @@ function Library (ronin) { - this.hello = function () { - + this.clear = function () { + console.log('clear') } } diff --git a/desktop/sources/scripts/lisp.js b/desktop/sources/scripts/lisp.js index c54763e..1c5b79f 100644 --- a/desktop/sources/scripts/lisp.js +++ b/desktop/sources/scripts/lisp.js @@ -94,6 +94,7 @@ function Lisp (input, lib) { } this.toPixels = function () { + console.log(input) return interpret(this.parse(input)) } }