mirror of
https://github.com/rabbibotton/clog.git
synced 2025-12-06 02:30:42 -08:00
further work on presentations - transformers
This commit is contained in:
parent
a8cc2f8105
commit
fa80acb1a1
3 changed files with 49 additions and 20 deletions
|
|
@ -20,11 +20,15 @@
|
|||
(b1 (create-button body :content "Set (my-slot lisp-obj) Value"))
|
||||
(b2 (create-button body :content "Get (my-slot lisp-obj) Value"))
|
||||
(tmp (create-br body))
|
||||
(t1 (create-div body :content "[counter]")))
|
||||
(t1 (create-div body :content "[counter]"))
|
||||
(i3 (create-form-element body :text
|
||||
:label (create-label body :content "Change my-count:"))))
|
||||
;; We set up direct relationships between lisp obj and clog objects
|
||||
(link-form-element-to-slot i1 lisp-obj my-slot) ;; any change to i1 will change my-slot
|
||||
(link-slot-to-form-element lisp-obj my-slot i1) ;; any change to my-slot will change i1
|
||||
(link-slot-to-element lisp-obj my-count t1) ;; any change to my-count will chat t1
|
||||
(link-form-element-to-slot i1 lisp-obj my-slot) ;; any change to i1 will change my-slot
|
||||
(link-slot-to-form-element lisp-obj my-slot i1) ;; any change to my-slot will change i1
|
||||
(link-slot-to-element lisp-obj my-count t1) ;; any change to my-count will change h1
|
||||
(link-form-element-to-object
|
||||
i3 (my-count lisp-obj) :transform #'parse-integer) ;; any change to i3 will change my-count
|
||||
;; This change of my-slot will immediately change in the web page
|
||||
(setf (my-slot lisp-obj) "First Value")
|
||||
(set-on-click b1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue