[plt-scheme] printing class.ss objects

From: Neil W. Van Dyke (neil at neilvandyke.org)
Date: Tue Mar 18 00:38:14 EST 2003

Is there an easy way to make the print representation of a class.ss
object instance display its fields?  Currently, objects print opaque
like this:

   #<struct:object:server-authority%>

But I'd sometimes really prefer one of the following:

   #<struct:object:server-authority% "john" "smith.foo" 8080>

   #<struct:object:server-authority% user="john" host="smith.foo" portnum=8080>

A separate procedure like print-object-dump would also work, as would a
DrScheme feature similar to the Smalltalk Inspector (a snip or a browser).

Perhaps related question: is there a way to specify the structure
inspector (a la make-inspector) for a class.ss object?

-- 
                                             http://www.neilvandyke.org/


Posted on the users mailing list.