Update of /project/mcclim/cvsroot/mcclim/Apps/Inspector In directory common-lisp.net:/tmp/cvs-serv18302
Modified Files: inspector.lisp clouseau.asd Log Message: Added :new-process argument to INSPECTOR, and changed this to do it properly as suggested by Paolo Amoroso. Exported INSPECT-OBJECT and INSPECT-OBJECT-BRIEFLY to make extending the inspector easier for users. Made EQL specializers show up informatively.
Date: Fri Feb 4 21:17:43 2005 Author: pscott
Index: mcclim/Apps/Inspector/inspector.lisp diff -u mcclim/Apps/Inspector/inspector.lisp:1.11 mcclim/Apps/Inspector/inspector.lisp:1.12 --- mcclim/Apps/Inspector/inspector.lisp:1.11 Thu Feb 3 23:15:21 2005 +++ mcclim/Apps/Inspector/inspector.lisp Fri Feb 4 21:17:42 2005 @@ -52,11 +52,17 @@ pane :height (bounding-rectangle-height (stream-output-history pane))))
-(defun inspector (obj) - (let ((*print-length* 10) - (*print-level* 10)) - (run-frame-top-level - (make-application-frame 'inspector :obj obj)))) +(defun inspector (obj &key (new-process nil)) + (flet ((run () + (let ((*print-length* 10) + (*print-level* 10)) + (run-frame-top-level + (make-application-frame 'inspector :obj obj))))) + (if new-process + (clim-sys:make-process #'run + :name (format nil "Inspector Clouseau: ~S" + obj)) + (run))))
(defparameter *inspected-objects* '() "A list of objects which are currently being inspected with @@ -286,7 +292,9 @@ (format pane "~a " (if (typep specializer 'clim-mop:eql-specializer) - "EQL specializer" ; FIXME: says nothing + (format nil "(EQL ~S)" + (clim-mop:eql-specializer-object + specializer)) (class-name specializer))))))))))
(defun pretty-print-function (fun) @@ -446,8 +454,7 @@
(define-inspector-command (com-inspect :name t) () (let ((obj (accept t :prompt "Select an object"))) - (clim-sys:make-process #'(lambda () (inspector obj)) - :name "Inspector Clouseau"))) + (inspector obj :new-process t)))
(define-inspector-command (com-toggle-show-list-cells :name t) ((obj 'cons :gesture :select :prompt "Select a cons or list"))
Index: mcclim/Apps/Inspector/clouseau.asd diff -u mcclim/Apps/Inspector/clouseau.asd:1.1 mcclim/Apps/Inspector/clouseau.asd:1.2 --- mcclim/Apps/Inspector/clouseau.asd:1.1 Wed Feb 2 10:33:49 2005 +++ mcclim/Apps/Inspector/clouseau.asd Fri Feb 4 21:17:42 2005 @@ -22,7 +22,9 @@
(defpackage :clouseau (:use :clim-lisp :clim) - (:export #:inspector)) + (:export #:inspector + #:inspect-object + #:inspect-object-briefly))
(asdf::defsystem clouseau :serial t