mirror of
https://github.com/rabbibotton/clog.git
synced 2025-12-06 10:40:45 -08:00
refactor
This commit is contained in:
parent
06067d24fe
commit
95b22e46f0
3 changed files with 58 additions and 52 deletions
|
|
@ -23,7 +23,8 @@
|
|||
(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
|
||||
(declare (ignore tmp))
|
||||
;; We set up direct relationships between lisp objects and clog objects
|
||||
;; any change to i1 will change my-slot
|
||||
(link-form-element-to-slot i1 lisp-obj my-slot)
|
||||
;; any change to my-slot will change i1 after transforming
|
||||
|
|
@ -34,8 +35,8 @@
|
|||
(link-slot-to-element lisp-obj my-count t1)
|
||||
;; any change to i3 will change my-count
|
||||
;; and i3's value will be transformed to an integer
|
||||
(link-form-element-to-object
|
||||
i3 (my-count lisp-obj) :transform #'parse-integer)
|
||||
(link-form-element-to-slot i3 lisp-obj my-count
|
||||
:transform #'parse-integer)
|
||||
;; 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