From cbd18532ccb30b11ccf1c24fcec4ee2685519aed Mon Sep 17 00:00:00 2001 From: David Botton Date: Sun, 13 Feb 2022 19:20:50 -0500 Subject: [PATCH] fix typo --- source/clog-presentations.lisp | 6 +++--- tutorial/29-tutorial.lisp | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/source/clog-presentations.lisp b/source/clog-presentations.lisp index d56854e..e649586 100644 --- a/source/clog-presentations.lisp +++ b/source/clog-presentations.lisp @@ -23,18 +23,18 @@ `(set-on-change ,clog-obj (lambda (obj) (declare (ignore obj)) - (setf (,slot-name ,object) (value ,clog-obj))))) + (setf (,accessor ,object) (value ,clog-obj))))) ;;;;;;;;;;;;;;;;;;;;;;;;;; ;; link-element-to-slot ;; ;;;;;;;;;;;;;;;;;;;;;;;;;; -(defmacro link-element-to-slot (clog-obj object slot-name) +(defmacro link-element-to-slot (clog-obj object accessor) "Link changes to (text CLOG-OBJ) to (ACESSOR OBJECT)" `(set-on-change ,clog-obj (lambda (obj) (declare (ignore obj)) - (setf (,slot-name ,object) (text ,clog-obj))))) + (setf (,accessor ,object) (text ,clog-obj))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; link-slot-to-form-element ;; diff --git a/tutorial/29-tutorial.lisp b/tutorial/29-tutorial.lisp index 01ffe1a..53492cf 100644 --- a/tutorial/29-tutorial.lisp +++ b/tutorial/29-tutorial.lisp @@ -20,6 +20,7 @@ (b2 (create-button body :content "Get (my-slot lisp-obj) Value"))) (link-form-element-to-slot i1 lisp-obj my-slot) (link-slot-to-form-element lisp-obj my-slot i1) + (setf (my-slot lisp-obj) "First Value") (set-on-click b1 (lambda (obj) (setf (my-slot lisp-obj) (value i2))))