Update of /project/mcclim/cvsroot/mcclim/Apps/Inspector In directory common-lisp.net:/tmp/cvs-serv9276
Modified Files: inspector.lisp Log Message: Fixed glitch in formatting of hash tables. Somtimes "=" got wrapped down to the next row but nothing else did. This no longer occurs since the "=" is put in its own cell, rather than being jammed in the left cell along with the key.
Made it impossible to toggle inspection of nil. I've found that any attempt to toggle the inspection of nil is almost always a mistake, and an annoying one at that. If you want to inspect nil for some reason, you can always make a new inspector or use com-inspect.
Date: Tue Feb 8 23:00:36 2005 Author: pscott
Index: mcclim/Apps/Inspector/inspector.lisp diff -u mcclim/Apps/Inspector/inspector.lisp:1.18 mcclim/Apps/Inspector/inspector.lisp:1.19 --- mcclim/Apps/Inspector/inspector.lisp:1.18 Tue Feb 8 22:08:39 2005 +++ mcclim/Apps/Inspector/inspector.lisp Tue Feb 8 23:00:36 2005 @@ -31,8 +31,11 @@ (define-application-frame inspector () ((dico :initform (make-hash-table) :reader dico) (cons-cell-dico :initform (make-hash-table) :reader cons-cell-dico) - (print-length :initform (make-hash-table) :reader print-length) - (obj :initarg :obj :reader obj)) + (print-length :initform (make-hash-table) :reader print-length + :documentation "A hash table mapping list objects to +their specific print lengths, if they have one.") + (obj :initarg :obj :reader obj + :documentation "The object being inspected")) (:pointer-documentation t) (:panes (app :application :width 600 :height 500 @@ -115,7 +118,8 @@ :inherit-from t) (define-presentation-type cons () :inherit-from t) -(define-presentation-type long-list-tail () :inherit-from t) +(define-presentation-type long-list-tail () + :inherit-from t)
(define-presentation-method present (object (type settable-slot) stream @@ -304,11 +308,12 @@ (inspector-table (format pane "~A (test: ~A)" 'hash-table (hash-table-test object)) (loop for key being the hash-keys of object - do (inspector-table-row - (formatting-cell (pane) - (inspect-object key pane) - (princ "=" pane)) - (inspect-object (gethash key object) pane))))) + do (formatting-row (pane) + (formatting-cell (pane :align-x :right) + (inspect-object key pane)) + (formatting-cell (pane) (princ "=" pane)) + (formatting-cell (pane) + (inspect-object (gethash key object) pane))))))
(defmethod inspect-object ((object generic-function) pane) (inspector-table @@ -522,8 +527,9 @@
(define-inspector-command (com-toggle-inspect :name t) ((obj t :gesture :select :prompt "Select an object")) - (unless (eq obj (obj *application-frame*)) - (togglef (gethash obj (dico *application-frame*))))) + (unless (or (eq obj (obj *application-frame*)) + (null obj)) + (togglef (gethash obj (dico *application-frame*)))))
(define-inspector-command (com-remove-method :name t) ((obj 'method :gesture :delete :prompt "Remove method"))