Fix render regression with move to hashtables

This commit is contained in:
David Botton 2022-01-14 13:25:44 -05:00
parent c39e396c96
commit 35f95d4efc

View file

@ -546,6 +546,7 @@ of controls and double click to select control."
(setf (text btn-sim) "Simulate") (setf (text btn-sim) "Simulate")
(setf in-simulation nil) (setf in-simulation nil)
(maphash (lambda (html-id control) (maphash (lambda (html-id control)
(declare (ignore html-id))
(setf (hiddenp (get-placer control)) nil)) (setf (hiddenp (get-placer control)) nil))
(get-control-list app panel-id))) (get-control-list app panel-id)))
(t (t
@ -554,6 +555,7 @@ of controls and double click to select control."
(on-populate-control-properties-win win) (on-populate-control-properties-win win)
(setf in-simulation t) (setf in-simulation t)
(maphash (lambda (html-id control) (maphash (lambda (html-id control)
(declare (ignore html-id))
(setf (hiddenp (get-placer control)) t)) (setf (hiddenp (get-placer control)) t))
(get-control-list app panel-id)) (get-control-list app panel-id))
(focus (first-child content)))))) (focus (first-child content))))))
@ -563,21 +565,33 @@ of controls and double click to select control."
(window-focus win) (window-focus win)
(when fname (when fname
(setf file-name fname) (setf file-name fname)
(maphash (lambda (html-id control) (maphash
(place-inside-bottom-of (lambda (html-id control)
(bottom-panel box) (declare (ignore html-id))
(get-placer control)))
(get-control-list app panel-id))
(write-file (inner-html content) fname))
(maphash (lambda (html-id control)
(place-after control (get-placer control))
(get-control-list app panel-id))))
:initial-filename file-name)))
(set-on-click btn-rndr (lambda (obj)
(maphash (lambda (html-id control)
(place-inside-bottom-of (bottom-panel box) (place-inside-bottom-of (bottom-panel box)
(get-placer control))) (get-placer control)))
(get-control-list app panel-id)) (get-control-list app panel-id))
(write-file (inner-html content) fname)
(maphash
(lambda (html-id control)
(declare (ignore html-id))
(place-after control (get-placer control)))
(get-control-list app panel-id))))
:initial-filename file-name)))
(set-on-click btn-rndr
(lambda (obj)
(let (vars)
(maphash (lambda (html-id control)
;; hide placer
(place-inside-bottom-of (bottom-panel box)
(get-placer control))
(let ((vname (attribute control "data-clog-name")))
(push (format nil *builder-template2*
vname
html-id
(format nil "CLOG:~A" (type-of control)))
vars)))
(get-control-list app panel-id))
(let* ((cw (on-show-layout-code obj)) (let* ((cw (on-show-layout-code obj))
(result (format nil (result (format nil
*builder-template1* *builder-template1*
@ -587,24 +601,18 @@ of controls and double click to select control."
(inner-html content) (inner-html content)
"\\\\\\\"")) "\\\\\\\""))
panel-name panel-name
(mapcar (lambda (e) vars
(let ((vname (attribute e "data-clog-name")))
(when vname
(format nil *builder-template2*
vname
(html-id e)
(format nil "CLOG:~A" (type-of e))))))
(get-control-list app panel-id))
(html-id cw) (html-id cw)
(html-id cw)))) (html-id cw))))
(js-execute obj (format nil (js-execute obj (format nil
"editor_~A.setValue('~A');editor_~A.moveCursorTo(0,0);" "editor_~A.setValue('~A');editor_~A.moveCursorTo(0,0);"
(html-id cw) (html-id cw)
(escape-string result) (escape-string result)
(html-id cw)))) (html-id cw)))))
(maphash (lambda (html-id control) (maphash (lambda (html-id control)
(place-after control (get-placer control)) (declare (ignore html-id))
(get-control-list app panel-id))))) (place-after control (get-placer control)))
(get-control-list app panel-id))))
(set-on-click btn-prop (set-on-click btn-prop
(lambda (obj) (lambda (obj)
(input-dialog obj "Panel Name" (input-dialog obj "Panel Name"
@ -650,6 +658,7 @@ of controls and double click to select control."
(on-populate-control-list-win content) (on-populate-control-list-win content)
;; setup control events ;; setup control events
(set-on-focus control (lambda (obj) (set-on-focus control (lambda (obj)
(declare (ignore obj))
;; set focus is captured bound in case ;; set focus is captured bound in case
;; control is set to static or reached ;; control is set to static or reached
;; using tab selection ;; using tab selection