fixes to conform with new meta-model
authorDrew Crampsie <drewc@tech.coop>
Wed, 31 Aug 2005 21:42:51 +0000 (14:42 -0700)
committerDrew Crampsie <drewc@tech.coop>
Wed, 31 Aug 2005 21:42:51 +0000 (14:42 -0700)
darcs-hash:20050831214251-5417e-c30fa5067268d1822d0fd07c09097eddb82dbeb1.gz

src/lisp-on-lines.lisp
src/mewa/mewa.lisp
src/packages.lisp

index 7658722..81a33c9 100644 (file)
@@ -16,7 +16,7 @@ Generates a form that, when evaluated, initialises the given table as an lol obj
 This involves creating a meta-model, a clsql view-class, and the setting up the default attributes for a mewa presentation"
 
     `(progn 
-      (def-view-class/table ,table)
+      (def-view-class-from-table ,table)
       (set-default-attributes (quote ,(meta-model::sql->sym table))))))
     
 (defmacro initialize-lol-for-table (&rest tables)
index 785f05d..b09d594 100644 (file)
@@ -236,7 +236,10 @@ attributes is an alist keyed on the attribute name."
 
 (defmethod find-slot-presentation-for-attribute ((self mewa) attribute)
   (let ((class-name 
-        (or (gethash (second attribute) ucw::*slot-type-mapping*) 
+        (or (gethash (if (consp (second attribute))
+                         (car (second attribute))
+                              (second attribute))
+                              ucw::*slot-type-mapping*) 
             (error  "Can't find slot type for ~A" (second attribute)))))
                
          (cons (first attribute) (apply #'make-instance 
@@ -265,7 +268,7 @@ attributes is an alist keyed on the attribute name."
                   (initialize-slots p) 
                   (assoc type (find-all-attributes p))))
         ;;;; TODO: this can be cleaned up, probably CHANGE-CLASS is better here
-        (i (apply #'change-class p (or (second a)
+        (i (apply #'make-instance (or (second a)
                                      ;; if we didnt find the type, 
                                      ;; use the symbol as a class. 
                                      (if (eql (symbol-package type) 
index da10eed..27b9ae4 100644 (file)
    :instance-is-stored-p
 
    ;;;; Meta Model Exports))
-   :def-view-class/table
+   :define-meta-model
+   :def-view-class-from-table
    :def-view-class/meta
    :list-slot-types
    ))
\ No newline at end of file