diff --git a/tools/clog-builder-repl.clog b/tools/clog-builder-repl.clog index b2d840a..93ae7e6 100644 --- a/tools/clog-builder-repl.clog +++ b/tools/clog-builder-repl.clog @@ -1,6 +1,6 @@ -
\ No newline at end of file + (clog-terminal:echo target result))">
\ No newline at end of file diff --git a/tools/clog-builder-repl.lisp b/tools/clog-builder-repl.lisp index 04a70c0..d9776d2 100644 --- a/tools/clog-builder-repl.lisp +++ b/tools/clog-builder-repl.lisp @@ -1,21 +1,21 @@ -(in-package "CLOG-TOOLS") +(in-package :clog-tools) (defclass clog-builder-repl (clog:clog-panel) - ((package-div :reader package-div) (terminal :reader terminal))) + ((terminal :reader terminal) (package-div :reader package-div))) (defun create-clog-builder-repl (clog-obj &key (hidden nil) (class nil) (html-id nil) (auto-place t)) (let ((panel (change-class (clog:create-div clog-obj :content - "
" + "
" :hidden hidden :class class :html-id html-id :auto-place auto-place) 'clog-builder-repl))) - (setf (slot-value panel 'package-div) - (attach-as-child clog-obj "CLOGB3868568691" :clog-type - 'clog:clog-form-element :new-id t)) (setf (slot-value panel 'terminal) - (attach-as-child clog-obj "CLOGB3868568690" :clog-type + (attach-as-child clog-obj "CLOGB3868707661" :clog-type 'clog-terminal:clog-terminal-element :new-id t)) + (setf (slot-value panel 'package-div) + (attach-as-child clog-obj "CLOGB3868707662" :clog-type + 'clog:clog-form-element :new-id t)) (let ((target (terminal panel))) (declare (ignorable target)) (clog-terminal:attach-clog-terminal target :greetings diff --git a/tools/clog-builder.lisp b/tools/clog-builder.lisp index 710b6d0..4271766 100644 --- a/tools/clog-builder.lisp +++ b/tools/clog-builder.lisp @@ -146,6 +146,12 @@ (format nil "~&Error: ~A" condition) :time-out 3)) (format t "~&Error: ~A" condition))) + (unless (stringp form) + (let ((r (make-array '(0) :element-type 'base-char + :fill-pointer 0 :adjustable t))) + (with-output-to-string (s r) + (print form s)) + (setf form r))) (let* ((*standard-output* stream) (*error-output* stream) (*debugger-hook* #'my-debugger) @@ -1212,7 +1218,7 @@ of controls and double click to select control." (setf pk (second lf))) (when (> cp p) (return lf))) (when lf - (let ((result (capture-eval (format nil "~A" lf) + (let ((result (capture-eval lf :clog-obj (connection-body editor) :eval-in-package (format nil "~A" pk)))) (clog-web-alert (connection-body editor) "Result" @@ -2211,6 +2217,7 @@ of controls and double click to select control." (status (create-div content :class "w3-tiny w3-border")) (lisp-file t) (file-name "")) + (declare (ignore spacer)) (set-on-window-focus win (lambda (obj) (declare (ignore obj)) @@ -2264,8 +2271,7 @@ of controls and double click to select control." (when fname (setf file-name fname) (setf (window-title win) fname) - (let ((c (or (read-file fname) "")) - loc) + (let ((c (or (read-file fname) ""))) (cond ((or (equalp (pathname-type fname) "lisp") (equalp (pathname-type fname) "asd")) (setf (clog-ace:mode ace) "ace/mode/lisp") @@ -2318,7 +2324,6 @@ of controls and double click to select control." (clog-ace::js-ace ace))) :junk-allowed t)) (tv (text-value ace)) - (pk (text-value pac-line)) (lf nil) (cp 0)) (loop @@ -2326,9 +2331,9 @@ of controls and double click to select control." (unless lf (return nil)) (when (> cp p) (return lf))) (when lf - (let ((result (capture-eval (format nil "~A" lf) + (let ((result (capture-eval lf :clog-obj (connection-body obj) - :eval-in-package (format nil "~A" pk)))) + :eval-in-package (text-value pac-line)))) (clog-web-alert (connection-body obj) "Result" (format nil "~&result: ~A" result) :color-class "w3-green" diff --git a/tools/sys-browser.clog b/tools/sys-browser.clog index 595d997..fde9cae 100644 --- a/tools/sys-browser.clog +++ b/tools/sys-browser.clog @@ -1,4 +1,4 @@ -
 
status
" + "
 
status
" :hidden hidden :class class :html-id html-id :auto-place auto-place) 'sys-browser))) (setf (slot-value panel 'status-box) - (attach-as-child clog-obj "CLOGB3868698958" :clog-type + (attach-as-child clog-obj "CLOGB3868704979" :clog-type 'clog:clog-div :new-id t)) (setf (slot-value panel 'save-button) - (attach-as-child clog-obj "CLOGB3868698957" :clog-type + (attach-as-child clog-obj "CLOGB3868704978" :clog-type 'clog:clog-form-element :new-id t)) (setf (slot-value panel 'eval-button) - (attach-as-child clog-obj "CLOGB3868698956" :clog-type + (attach-as-child clog-obj "CLOGB3868704977" :clog-type 'clog:clog-form-element :new-id t)) (setf (slot-value panel 'eval-sel-button) - (attach-as-child clog-obj "CLOGB3868698955" :clog-type + (attach-as-child clog-obj "CLOGB3868704976" :clog-type 'clog:clog-form-element :new-id t)) (setf (slot-value panel 'eval-form-button) - (attach-as-child clog-obj "CLOGB3868698954" :clog-type + (attach-as-child clog-obj "CLOGB3868704975" :clog-type 'clog:clog-form-element :new-id t)) (setf (slot-value panel 'file-name) - (attach-as-child clog-obj "CLOGB3868698953" :clog-type + (attach-as-child clog-obj "CLOGB3868704974" :clog-type 'clog:clog-div :new-id t)) (setf (slot-value panel 'src-box) - (attach-as-child clog-obj "CLOGB3868698952" :clog-type + (attach-as-child clog-obj "CLOGB3868704973" :clog-type 'clog-ace:clog-ace-element :new-id t)) (setf (slot-value panel 'pac-box) - (attach-as-child clog-obj "CLOGB3868698951" :clog-type + (attach-as-child clog-obj "CLOGB3868704972" :clog-type 'clog:clog-form-element :new-id t)) (setf (slot-value panel 'doc-box) - (attach-as-child clog-obj "CLOGB3868698950" :clog-type + (attach-as-child clog-obj "CLOGB3868704971" :clog-type 'clog:clog-text-area :new-id t)) (setf (slot-value panel 'class-box) - (attach-as-child clog-obj "CLOGB3868698949" :clog-type + (attach-as-child clog-obj "CLOGB3868704970" :clog-type 'clog:clog-select :new-id t)) (setf (slot-value panel 'search-box) - (attach-as-child clog-obj "CLOGB3868698948" :clog-type + (attach-as-child clog-obj "CLOGB3868704969" :clog-type 'clog:clog-form-element :new-id t)) (setf (slot-value panel 'class-only) - (attach-as-child clog-obj "CLOGB3868698947" :clog-type + (attach-as-child clog-obj "CLOGB3868704968" :clog-type 'clog:clog-form-element :new-id t)) (setf (slot-value panel 'label-class-only) - (attach-as-child clog-obj "CLOGB3868698946" :clog-type + (attach-as-child clog-obj "CLOGB3868704967" :clog-type 'clog:clog-label :new-id t)) (setf (slot-value panel 'package-box) - (attach-as-child clog-obj "CLOGB3868698945" :clog-type + (attach-as-child clog-obj "CLOGB3868704966" :clog-type 'clog:clog-select :new-id t)) (setf (slot-value panel 'type-box) - (attach-as-child clog-obj "CLOGB3868698944" :clog-type + (attach-as-child clog-obj "CLOGB3868704965" :clog-type 'clog:clog-select :new-id t)) (let ((target (type-box panel))) (declare (ignorable target)) @@ -151,9 +151,9 @@ (when (> cp p) (return lf))) (when lf (let ((result - (capture-eval (format nil "~A" lf) - :clog-obj (connection-body panel) - :eval-in-package (format nil "~A" pk)))) + (capture-eval lf :clog-obj + (connection-body panel) :eval-in-package + (format nil "~A" pk)))) (clog-web-alert (connection-body panel) "Result" (format nil "~&result: ~A" result) :color-class "w3-green" :time-out 3))))))