Added NULL description and added :when option for attribute active
authordrewc <drewc@tech.coop>
Thu, 28 Aug 2008 20:16:32 +0000 (13:16 -0700)
committerdrewc <drewc@tech.coop>
Thu, 28 Aug 2008 20:16:32 +0000 (13:16 -0700)
darcs-hash:20080828201632-39164-a2a9ccf0c2e99f36046543911b7158bb276c9e73.gz

lisp-on-lines.asd
src/attribute.lisp

index 0e32bf7..f4af77b 100644 (file)
@@ -60,7 +60,9 @@ OTHER DEALINGS IN THE SOFTWARE."
                                                           (:file "edit")
                                                           (:file "symbol")
                                                           (:file "list")
                                                           (:file "edit")
                                                           (:file "symbol")
                                                           (:file "list")
-                                                          (:file "clos"))
+                                                          (:file "null")
+                                                          (:file "clos")
+                                                          )
                                                           
                                              :serial t))
                                     
                                                           
                                              :serial t))
                                     
@@ -68,9 +70,9 @@ OTHER DEALINGS IN THE SOFTWARE."
   :serial t
   :depends-on (:contextl :arnesi :alexandria :parse-number
                         ;;for rofl:
   :serial t
   :depends-on (:contextl :arnesi :alexandria :parse-number
                         ;;for rofl:
-                         :cl-postgres :simple-date :postmodern))
-
-
+                        :cl-postgres
+                        :simple-date-postgres
+                        :postmodern ))
 
 
 (defsystem :lisp-on-lines.test
 
 
 (defsystem :lisp-on-lines.test
index 210b36d..d332f60 100644 (file)
                       :layered t
                       :special t)))
 
                       :layered t
                       :special t)))
 
+(define-layered-method attribute-active-p :around (attribute)                 
+ (let ((active? (call-next-method)))
+   (if (eq :when active?)
+       (not (null (attribute-value attribute)))
+       active?)))
+                      
 (define-layered-method attribute-label-formatter :around (attribute)
    (or (slot-value attribute 'label-formatter) 
        (attribute-value (find-attribute (attribute-description attribute) 'label-formatter))
 (define-layered-method attribute-label-formatter :around (attribute)
    (or (slot-value attribute 'label-formatter) 
        (attribute-value (find-attribute (attribute-description attribute) 'label-formatter))