added dont-show-unset-slots mixin, should work with any mewa-presentation
authordrewc <drewc@tech.coop>
Mon, 20 Jun 2005 18:11:47 +0000 (11:11 -0700)
committerdrewc <drewc@tech.coop>
Mon, 20 Jun 2005 18:11:47 +0000 (11:11 -0700)
darcs-hash:20050620181147-39164-912702972c6ac01616ac2e9e4764d58affa23100.gz

src/mewa/presentations.lisp

index f10d1cb..9cf4fcb 100644 (file)
            (slot-value listing 'ucw::place) (slot-value self 'ucw::place)
            (slot-value listing 'ucw::continuation) (slot-value self 'ucw::continuation))
     
-      (render-on res listing))))
\ No newline at end of file
+      (render-on res listing))))
+
+
+;;;;
+(defcomponent dont-show-unset-slots ()())
+
+(defmethod slots :around ((self dont-show-unset-slots))
+  (remove-if-not #'(lambda (s) (let ((s (presentation-slot-value s (instance self))))
+                                (and s (not (equal "" s)))))
+                (call-next-method)))
\ No newline at end of file