X-Git-Url: https://git.hcoop.net/clinton/lisp-on-lines.git/blobdiff_plain/c1869452e310290dd53fe066cf329b37e5a89217..598f1fa8d4a53d8b531ee283b69bba52f3a4bd13:/src/lisp-on-lines.lisp diff --git a/src/lisp-on-lines.lisp b/src/lisp-on-lines.lisp index bcd20e5..ca00bc5 100644 --- a/src/lisp-on-lines.lisp +++ b/src/lisp-on-lines.lisp @@ -42,19 +42,20 @@ This involves creating a meta-model, a clsql view-class, and the setting up the `(:initargs '(,@ (mapcan #'identity args))))))) -(defmethod make-view (object &rest args &key (type :viewer) (attributes nil) +(defmethod make-view (object &rest args &key (type :viewer) &allow-other-keys ) - (warn "~A ~A ~A" attributes type object) - (remf args :type ) - (remf args :attributes) - (apply #'make-presentation object (cddr (%make-view object type attributes args)))) + (remf args :type) + ;(warn "~A ~A" args `(:type ,type :initargs ,@args)) + (apply #'make-presentation object `(:type ,type ,@ (when args + `(:initargs ,args))))) (defmacro present-view ((object &optional (type :viewer) (parent 'self)) &body attributes-and-args) (arnesi:with-unique-names (view) `(let ((,view (lol:make-view ,object :type ,type - :attributes ,(car attributes-and-args) + ,@(when (car attributes-and-args) + `(:attributes ',(car attributes-and-args))) ,@ (cdr attributes-and-args)))) (setf (ucw::parent ,view) ,parent) (lol:present ,view))))