From: drewc Date: Mon, 20 Jun 2005 18:11:47 +0000 (-0700) Subject: added dont-show-unset-slots mixin, should work with any mewa-presentation X-Git-Url: https://git.hcoop.net/clinton/lisp-on-lines.git/commitdiff_plain/bbf64329ccabd5630c034bdb793fb3531522f3d7 added dont-show-unset-slots mixin, should work with any mewa-presentation darcs-hash:20050620181147-39164-912702972c6ac01616ac2e9e4764d58affa23100.gz --- diff --git a/src/mewa/presentations.lisp b/src/mewa/presentations.lisp index f10d1cb..9cf4fcb 100644 --- a/src/mewa/presentations.lisp +++ b/src/mewa/presentations.lisp @@ -93,4 +93,13 @@ (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