Ok, the learning curve is steep and my idea on what I'm doing is less then basic. However here we go, this is the code (defmodel foobar (model) ((val-1 :cell t :accessor val-1 :initform "" :initarg :val-1) (val-3 :cell t :accessor val-3 :initarg :val-3 :initform (c-in "Initialize"))))
(def-c-output val-1 () (format t "val-1 is ~a, val-3 is ~a~%" (val-1 self) (val-3 self)))
(defun foo-test () (cell-reset) (let ((obj (make-instance 'foobar :val-1 (c? (if (val-3 self) (setf (val-1 self) (val-3 self)) "val-3 not set")))))
(setf (val-3 obj) "another val-3") (setf (val-3 obj) "yet another val for val-3")) (values))
In this utterly primitive example the val3 slot "steers" the slot-1 slot. Translated to my need to sync db-view and "user-view", I assume I have to write model with the two objects in it do the initialization from one side (e.g populating from the database), I probably also have to write a function to feed to the :unchanged (or so slot), if that yiels true, then the view and database data are in sync if not I have to update the database data from the view.
Is this the way to go, or am I overlooking something (I guess I do, just cells is too new for me....)
Regards Friedrich