[cl-graph-devel] printing readably and presentation question (SBCL + MCCLIM + CL-GRAPH)

Gary King gwking at metabang.com
Mon Feb 13 02:35:02 UTC 2006


Hi John,

I'm hardly CLIM savvy at all (it's on the great list of things to do  
sometime soon...) so I can't help much. I'll try to do some reading  
tonight and see if that brings me any insight.

On Feb 12, 2006, at 2:19 PM, John Morrison wrote:

> Hi;
>
> Apologies in advance if this turns out to be a "stupid newbie"
> question (and there is great potential for it to be a three-way newbie
> question: CLOS, cl-graph, and/or CLIM/McCLIM):
>
> I am trying to write a McCLIM application which includes a graphical
> editor for cl-graph based data structures (Linux+SBCL).
>
> When I try to use accepting-values to accept an instance of a class
> derived from cl-graph:basic-vertex, it seems that the "print-object"
> method of basic-vertex ends up producing something that confuses the
> "accept" machinery:
>
> (defmethod print-object ((vertex basic-vertex) stream)
>   (print-unreadable-object (vertex stream :identity nil)
>     (format stream "~A"
>             (if (and (slot-exists-p vertex 'element) (slot-boundp  
> vertex
> 'element))
>               (element vertex) "#unbound#"))))
>
> --- cut here ---
>
> accepting-values accept condition: Error parsing "#<vtx10515>" for
> presentation type vtx
>
> --- cut here ---
>
> I tried setting *print-readably* to t (from nil), but the obvious
> thing happened (print-not-readable error) when it hit the
> print-unreadable-object.
>
> If (a big "if," I know) this is the case, what is the best stylistic
> way to handle this?
>
> 1. Define my own print-object primary method which prints readably?
> If so, what does a reasonably portable version look like?
>
> 2. Define an around method that doesn't call-next-method?
>
> 3. Attempt some weird method-combination voodoo?
>
> 4. Something else entirely?
>
> Thanks!
>
> -jm
>
> -- 
> ==== John Morrison
> ==== MAK Technologies Inc.
> ==== 68 Moulton Street, Cambridge, MA 02138
> ==== http://www.mak.com/
> ==== vox:617-876-8085 x115
> ==== fax:617-876-9208
> ==== jm at mak.com
>
> _______________________________________________
> cl-graph-devel mailing list
> cl-graph-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/cl-graph-devel


-- 
Gary Warren King
metabang.com
http://www.metabang.com/





More information about the cl-graph-devel mailing list