[mcclim-cvs] CVS update: mcclim/Apps/Inspector/INSTALL mcclim/Apps/Inspector/inspector.lisp

Vincent Arkesteijn varkesteijn at common-lisp.net
Tue Feb 8 22:14:02 UTC 2005


Update of /project/mcclim/cvsroot/mcclim/Apps/Inspector
In directory common-lisp.net:/tmp/cvs-serv9766

Modified Files:
	INSTALL inspector.lisp 
Log Message:
* Fixed the command  Describe Slot  to correctly list the reader and writer functions, when available.
* Removed two colons from INSTALL file to reflect the exported status of clouseau:inspector.

Date: Tue Feb  8 23:14:01 2005
Author: varkesteijn

Index: mcclim/Apps/Inspector/INSTALL
diff -u mcclim/Apps/Inspector/INSTALL:1.2 mcclim/Apps/Inspector/INSTALL:1.3
--- mcclim/Apps/Inspector/INSTALL:1.2	Thu Feb  3 19:47:18 2005
+++ mcclim/Apps/Inspector/INSTALL	Tue Feb  8 23:14:01 2005
@@ -5,7 +5,7 @@
 
 3. Try something like:
 
-   (clouseau::inspector (clim:make-application-frame 'clouseau::inspector :obj 20))
+   (clouseau:inspector (clim:make-application-frame 'clouseau:inspector :obj 20))
 
    in order to inspect the inspector pane.
 


Index: mcclim/Apps/Inspector/inspector.lisp
diff -u mcclim/Apps/Inspector/inspector.lisp:1.19 mcclim/Apps/Inspector/inspector.lisp:1.20
--- mcclim/Apps/Inspector/inspector.lisp:1.19	Tue Feb  8 23:00:36 2005
+++ mcclim/Apps/Inspector/inspector.lisp	Tue Feb  8 23:14:01 2005
@@ -567,23 +567,24 @@
 	   (class (class-of object))
 	   (documentation (handler-bind ((warning #'muffle-warning))
 			    (slot-documentation class slot-name)))
-	   (slot-object (find slot-name (clim-mop:class-slots class)
-			      :key #'clim-mop:slot-definition-name)))
+	   (slot-object (or (find slot-name (clim-mop:class-direct-slots class)
+                                  :key #'clim-mop:slot-definition-name)
+                            (find slot-name (clim-mop:class-slots class)
+                                  :key #'clim-mop:slot-definition-name))))
       (when documentation
 	(format stream "~&Documentation: ~A~%" documentation))
       (format stream "~&Type: ~S~%"
 	      (clim-mop:slot-definition-type slot-object))
       (format stream "~&Allocation: ~S~%"
 	      (clim-mop:slot-definition-allocation slot-object))
-      ;; FIXME: This should show readers and writers for object slots
-      ;; (but not structure slots), but it doesn't work on SBCL 0.8.16
-      ;; for me. Is this an SBCL-specific problem?  Is the code
-      ;; broken?
-      (when (clim-mop:slot-definition-readers slot-object)
-	(format stream "~&Readers: ")
-	(format-textual-list (clim-mop:slot-definition-readers slot-object)
-			     #'inspect-object))
-      (when (clim-mop:slot-definition-writers slot-object)
-	(format stream "~&Writers: ")
-	(format-textual-list (clim-mop:slot-definition-writers slot-object)
-			     #'inspect-object)))))
\ No newline at end of file
+      ;; slot-definition-{readers,writers} only works for direct slot
+      ;; definitions
+      (let ((readers (clim-mop:slot-definition-readers slot-object)))
+        (when readers
+          (format stream "~&Readers: ")
+          (present readers (presentation-type-of readers) :stream stream)))
+      (let ((writers (clim-mop:slot-definition-writers slot-object)))
+        (when writers
+          (format stream "~&Writers: ")
+          (present writers (presentation-type-of writers) :stream stream))))))
+




More information about the Mcclim-cvs mailing list