clog-builder-repl command added to clog repl

This commit is contained in:
David Botton 2024-04-07 10:24:56 -04:00
parent a9d0ce3c43
commit abe677a983

View file

@ -141,8 +141,6 @@ clog-builder window.")
(setf (hiddenp (copy-history-win app)) nil)
(window-focus (copy-history-win app)))
(let* ((win (create-gui-window obj :title "Copy History"
:left 225
:top 480
:height 400 :width 600
:has-pinner t :client-movement *client-side-movement*)))
(window-center win)
@ -254,14 +252,22 @@ clog-builder window.")
(on-open-console panel)))
(defun repl-on-commmand (panel target data)
(multiple-value-bind (result new-package)
(capture-eval data :clog-obj panel
:capture-console (not *clog-repl-use-console*)
:capture-result (not *clog-repl-send-result-to-console*)
:eval-in-package (text-value (package-div panel)))
(setf (text-value (package-div panel))
(string-downcase (package-name new-package)))
(clog-terminal:echo target result)))
(if (equalp data "(clog-builder-repl)")
(let* ((*default-title-class* *builder-title-class*)
(*default-border-class* *builder-border-class*)
(win (create-gui-window panel :title "CLOG Builder REPL GUI Window"
:height 400 :width 600
:has-pinner t
:client-movement *client-side-movement*)))
(setf clog-user::*body* (window-content win)))
(multiple-value-bind (result new-package)
(capture-eval data :clog-obj panel
:capture-console (not *clog-repl-use-console*)
:capture-result (not *clog-repl-send-result-to-console*)
:eval-in-package (text-value (package-div panel)))
(setf (text-value (package-div panel))
(string-downcase (package-name new-package)))
(clog-terminal:echo target result))))
(defun on-show-callers (body)
"Open callers window"
@ -570,4 +576,4 @@ instead of the project window will be displayed."
(format nil "~A" 1280) (format nil "~A" 840))))
(when start-browser
(format t "~%If browser does not start go to http://127.0.0.1:~A/builder~%~%" port)
(open-browser :url (format nil "http://127.0.0.1:~A/builder" port))))
(open-browser :url (format nil "http://127.0.0.1:~A/builder" port))))