HCoop
/
clinton
/
lisp-on-lines.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
bf5ae49
)
added a clear-class-attributes method, and added it to set-default-attributes so...
author
Drew Crampsie
<drewc@tech.coop>
Thu, 7 Jul 2005 02:45:19 +0000
(19:45 -0700)
committer
Drew Crampsie
<drewc@tech.coop>
Thu, 7 Jul 2005 02:45:19 +0000
(19:45 -0700)
darcs-hash:
20050707024519
-5417e-
8cd585f6177ec1100b368850edb71c2886f2bd32
.gz
src/mewa/mewa.lisp
patch
|
blob
|
blame
|
history
diff --git
a/src/mewa/mewa.lisp
b/src/mewa/mewa.lisp
index
54ab29d
..
70cce96
100644
(file)
--- a/
src/mewa/mewa.lisp
+++ b/
src/mewa/mewa.lisp
@@
-65,6
+65,9
@@
attributes is an alist keyed on the attribute nreeame."
(defmethod find-class-attributes ((model symbol))
(find-or-create-attributes model))
(defmethod find-class-attributes ((model symbol))
(find-or-create-attributes model))
+(defmethod clear-class-attributes ((model t))
+ (setf (cdr (find-class-attributes model)) nil))
+
(defmethod add-attribute ((model t) name def)
(let ((map (find-class-attributes model)))
(setf (cdr map) (acons name def (cdr map)))))
(defmethod add-attribute ((model t) name def)
(let ((map (find-class-attributes model)))
(setf (cdr map) (acons name def (cdr map)))))
@@
-113,6
+116,7
@@
attributes is an alist keyed on the attribute nreeame."
(meta-model:list-has-many model))))
(defmethod set-default-attributes ((model t))
(meta-model:list-has-many model))))
(defmethod set-default-attributes ((model t))
+ (clear-class-attributes model)
(mapcar #'(lambda (x)
(setf (find-attribute model (car x)) (cdr x)))
(default-attributes model)))
(mapcar #'(lambda (x)
(setf (find-attribute model (car x)) (cdr x)))
(default-attributes model)))