fix all the definitions affected by defdisplay refactoring
[clinton/lisp-on-lines.git] / src / lisp-on-lines.lisp
index c58c938..3c02bd9 100644 (file)
@@ -43,7 +43,6 @@
 ;;;; The following macros are used to initialise a set of database tables as LoL objects.
 
 
-
 (eval-when (:compile-toplevel :load-toplevel :execute)
   (defun generate-define-view-for-table (table)
     "
@@ -64,18 +63,24 @@ This involves creating a meta-model, a clsql view-class, and the setting up the
   "expands to init-i-f-t using the listing of tables provided by meta-model"
   `(define-view-for-table ,@(meta-model::list-tables)))
 
+
+
+;;;; These are some macros over the old presentation system.
+;;;; Considered depreciated, they will eventually be implemented in terms of the new
+;;;; display system, and delegated to backwards-compat-0.2.lisp
+
 (eval-when (:compile-toplevel :load-toplevel :execute)
   (defun %make-view (object type attributes args)
    
-      (when attributes
-       (setf args
-             (cons `(:attributes ,attributes) args)))
-      `(mewa::make-presentation
-       ,object
-       :type ,type
-       ,@(when args
-               `(:initargs
-                 '(,@ (mapcan #'identity args)))))))
+    (when attributes
+      (setf args
+           (cons `(:attributes ,attributes) args)))
+    `(mewa::make-presentation
+      ,object
+      :type ,type
+      ,@(when args
+             `(:initargs
+               '(,@ (mapcan #'identity args)))))))
 
 (defmethod make-view (object &rest args &key (type :viewer)
                      &allow-other-keys )
@@ -106,7 +111,11 @@ This involves creating a meta-model, a clsql view-class, and the setting up the
   (mewa::find-attribute-slot self slot-name))
 
 (defmethod present-slot-view ((self mewa) slot-name &optional (instance (instance self)))
-  (present-slot (slot-view self slot-name) instance))
+  (let ((v (slot-view self slot-name)))
+
+     (if v
+        (present-slot v instance)
+        (<:as-html slot-name))))
 
 
 (defmethod find-slots-of-type (model &key (type 'string)