[mcclim-devel] Problems getting "format-graph-from-roots" to work...

Peter Braroe peter.braroe at newsmachine.com
Tue Feb 7 09:50:12 UTC 2006


Hello all! 

I have gotten slightly further in my ambition to make a clim program to
draw tree diagrams. After looking at various examples I have put
together a little program that gives the error below. 

No matching method for the generic function
#<STANDARD-GENERIC-FUNCTION CLIM:LAYOUT-GRAPH-NODES (1) {58CD5C11}>,
when
called with arguments
(#<CLIM-INTERNALS::DIGRAPH-GRAPH-OUTPUT-RECORD X 0.0d0:0.0d0 Y
0.0d0:0.0d0
   {59D5278D}>
 #<CLIM:APPLICATION-PANE TREE-TEST::SCREEN {59BF5855}> NIL NIL).
   [Condition of type PCL::NO-APPLICABLE-METHOD-ERROR]


I am loading CLIM with asdf in my .cmucl-init and doing other stuff such
as drawing a lines, rectangles works fine... Is it the code or my
environment? I am getting seriously frustrated...

Ideas? 

Also my clim package 0.9.1 does not seem to have
"format-graph-from-root" (singular) only the "format-graph-from-roots"
is this because the one root only version is not implemented? Does
anyone know?

Thanks beforehand for any help, 

/Peter
______________________________________________________________________
draw-tree.cl

(defpackage :tree-test (:USE :CLIM :CLIM-EXTENSIONS :CLIM-LISP))

(in-package :tree-test)

(defvar *test-frame* nil)
(defvar *test-pane* nil)

(defun run-tree-test ()
  (let ((*test-frame*
	       (setf *test-frame*
		     (make-application-frame 'tree-test
					     :height 400
					     :width 700 					     :doc-title "Tree diagram test"))))
    (run-frame-top-level *test-frame*)
    *test-frame*))


(define-application-frame tree-test ()
  ()
  
  (:menu-bar menubar-command-table)
  (:panes
   (screen :application
           :display-time nil
           :text-style (make-text-style :sans-serif :roman :normal)
	   )
   )
  (:layouts
   (defaults (vertically () screen)
     )
   )
  #+nil
  (:top-level (tree-test-frame-top-level)))

(make-command-table 'menubar-command-table
		    :errorp nil
		    :menu '(("Draw Tree" :command com-tree)))

(define-tree-test-command com-tree ()
  (draw-tree))


(defun draw-tree ()

  (setq *test-pane* (get-frame-pane *test-frame* 'screen))

  (format-graph-from-roots '((a (b (d)) (c (d))))
			   #'(lambda (x s) (princ (car x) s))
			   #'cdr
			   :stream *standard-output*
			   :orientation :vertical
			   :merge-duplicates t
			   :duplicate-key #'car))



Note: Have tried both *standard-output* and *test-pane* as :stream

______________________________________________________________________
No matching method for the generic function
#<STANDARD-GENERIC-FUNCTION CLIM:LAYOUT-GRAPH-NODES (1) {58CD5C11}>,
when
called with arguments
(#<CLIM-INTERNALS::DIGRAPH-GRAPH-OUTPUT-RECORD X 0.0d0:0.0d0 Y
0.0d0:0.0d0
   {59D5278D}>
 #<CLIM:APPLICATION-PANE TREE-TEST::SCREEN {59BF5855}> NIL NIL).
   [Condition of type PCL::NO-APPLICABLE-METHOD-ERROR]

Restarts:
  0: [CONTINUE] Retry call to :FUNCTION.
  1: [ABORT] Return to application command loop
  2: [ABORT] Abort handling SLIME request.
  3: [ABORT] Return to Top-Level.

Backtrace:
  0: ("DEFMETHOD NO-APPLICABLE-METHOD (T)" #<#1=unused-arg> #<#1#>
#<STANDARD-GENERIC-FUNCTION CLIM:LAYOUT-GRAPH-NODES (1) {58CD5C11}>
(#<CLIM-INTERNALS::DIGRAPH-GRAPH-OUTPUT-RECORD X 0.0d0:0.0d0 Y
0.0d0:0.0d0 {59D5278D}> #<CLIM:APPLICATION-PANE TREE-TEST::SCREEN
{59BF5855}> NIL NIL))
  1: ((FLET #:CONTINUATION99 (LABELS CLIM-INTERNALS::CONT
CLIM:FORMAT-GRAPH-FROM-ROOTS)) #<CLIM:APPLICATION-PANE TREE-TEST::SCREEN
{59BF5855}>)
  2: ((METHOD CLIM:INVOKE-WITH-OUTPUT-RECORDING-OPTIONS NIL
(CLIM:OUTPUT-RECORDING-STREAM T T T)) #<#1=unused-arg> #<#1#>
#<CLIM:APPLICATION-PANE TREE-TEST::SCREEN {59BF5855}> #<Closure Over
Function (FLET #:CONTINUATION99 (LABELS CLIM-INTERNALS::CONT
CLIM:FORMAT-GRAPH-FROM-ROOTS)) {59D528C1}> ...)
  3: ((METHOD CLIM:INVOKE-WITH-NEW-OUTPUT-RECORD NIL
(CLIM:OUTPUT-RECORDING-STREAM T T NULL)) (#() . #(#)) #<unused-arg>
#<CLIM:APPLICATION-PANE TREE-TEST::SCREEN {59BF5855}> #<Closure Over
Function (LABELS CLIM-INTERNALS::CONT CLIM:FORMAT-GRAPH-FROM-ROOTS)
{59D51C09}> ...)
  4: (CLIM:FORMAT-GRAPH-FROM-ROOTS ((TREE-TEST::A # #)) #<Function
"DEFUN DRAW-TREE" {59BEF231}> #<Function CDR
{101CF0C9}> :ORIENTATION ...)
  5: ((METHOD CLIM:DEFAULT-FRAME-TOP-LEVEL NIL (CLIM:APPLICATION-FRAME))
(#() . #(# # # # # ...)) #<unused-arg> #<TREE-TEST::TREE-TEST
{59BF2A5D}> NIL)
  6: ("LAMBDA (.KEYARGS-START. .VALID-KEYS. G6356)" #<#1=unused-arg>
#<#1#> #<TREE-TEST::TREE-TEST {59BF2A5D}> NIL)
  7: ((METHOD CLIM:RUN-FRAME-TOP-LEVEL NIL (CLIM:APPLICATION-FRAME))
(#(20) . #()) #<#1=unused-arg> #<TREE-TEST::TREE-TEST {59BF2A5D}>
#<#1#>)
  8: ((METHOD CLIM:RUN-FRAME-TOP-LEVEL (:AROUND)
#1=(CLIM:APPLICATION-FRAME)) (#(16 15) . #(#))
#S(PCL::FAST-METHOD-CALL :FUNCTION #<Function (METHOD
CLIM:RUN-FRAME-TOP-LEVEL NIL #1#) {58C4A031}> :PV-CELL (# .
#) :NEXT-METHOD-CALL NIL :ARG-INFO (1 . T)) #<TREE-TEST::TREE-TEST
{59BF2A5D}> NIL)
  9: (TREE-TEST::RUN-TREE-TEST)
 10: (SWANK::EVAL-REGION "(tree-test::run-tree-test)
" T)
 11: ("DEFSLIMEFUN LISTENER-EVAL")
 12: (SWANK::CALL-WITH-BUFFER-SYNTAX #<Closure Over Function
"DEFSLIMEFUN LISTENER-EVAL" {59BF2261}>)
 13: ("DEFUN EVAL-FOR-EMACS")
 14: ((METHOD SWANK-BACKEND:CALL-WITH-DEBUGGER-HOOK NIL (T T))
#<#1=unused-arg> #<#1#> #<Function SWANK:SWANK-DEBUGGER-HOOK {59F4E871}>
#<Closure Over Function "DEFUN EVAL-FOR-EMACS" {59BF2189}>)
 15: ("DEFUN HANDLE-REQUEST")
 16: ("DEFUN CALL-WITH-CONNECTION")
 17: (SWANK::CALL-WITH-REDIRECTED-IO #<SWANK::CONNECTION {59F36D15}>
#<Closure Over Function "DEFUN CALL-WITH-CONNECTION" {59BF1F09}>)
 18: (SWANK::CALL-WITH-CONNECTION #<SWANK::CONNECTION {59F36D15}>
#<Function "DEFUN HANDLE-REQUEST" {5A001911}>)
 19: (SWANK::HANDLE-REQUEST #<SWANK::CONNECTION {59F36D15}>)
 20: (SWANK::PROCESS-AVAILABLE-INPUT #<Stream for descriptor 6>
#<Closure Over Function "DEFUN INSTALL-SIGIO-HANDLER" {59BF1EF9}>)
 21: ((FLET SWANK::HANDLER SWANK::INSTALL-SIGIO-HANDLER))
 22: (SWANK-BACKEND::SIGIO-HANDLER #<#1=unused-arg> #<#1#> #<#1#>)
 23: ("call_into_lisp+#x8C [#x80548DC] /usr/bin/cmucl")
 24: ("funcall3+#x29 [#x80546E4] /usr/bin/cmucl")
 25: ("interrupt_handle_now+#xEF [#x80503A3] /usr/bin/cmucl")
 26: ("NIL+#x80507C4 [#x80507C4] /usr/bin/cmucl")
 27: ("__kernel_sigreturn+#x0 [#xFFFFE420] ")
 28: (SYSTEM:WAIT-UNTIL-FD-USABLE 0 :INPUT NIL)
 29: (LISP::DO-INPUT #<Stream for Standard Input>)
 30: (LISP::INPUT-CHARACTER #<Stream for Standard Input> NIL
(LISP::*EOF*))
 31: (LISP::SYNONYM-IN #<Synonym Stream to SYSTEM:*STDIN*> NIL
(LISP::*EOF*))
 32: (LISP::TWO-WAY-IN #<Two-Way Stream, Input = #<Synonym Stream to
SYSTEM:*STDIN*>, Output = #<Synonym Stream to SYSTEM:*STDOUT*>> NIL
(LISP::*EOF*))
 33: (LISP::SYNONYM-IN #<Synonym Stream to
SWANK::*CURRENT-STANDARD-INPUT*> NIL (LISP::*EOF*))
 34: (READ-CHAR #<Synonym Stream to SWANK::*CURRENT-STANDARD-INPUT*> NIL
(LISP::*EOF*) NIL)
 35: (LISP::READ-PRESERVING-WHITESPACE-INTERNAL #<Synonym Stream to
SWANK::*CURRENT-STANDARD-INPUT*> NIL (:EOF) T)
 36: (LISP::READ-PRESERVING-WHITESPACE-INTERNAL #<Synonym Stream to
SWANK::*CURRENT-STANDARD-INPUT*> NIL (:EOF) NIL)
 37: (LISP::READ-PRESERVING-WHITESPACE-INTERNAL 4 #<Synonym Stream to
SWANK::*CURRENT-STANDARD-INPUT*> NIL (:EOF) ...)[:EXTERNAL]
 38: (LISP::READ-INTERNAL #<Synonym Stream to
SWANK::*CURRENT-STANDARD-INPUT*> NIL (:EOF) NIL)
 39: (READ #<Synonym Stream to SWANK::*CURRENT-STANDARD-INPUT*> NIL
(:EOF) NIL)
 40: (LISP::%TOP-LEVEL)
 41: ((LABELS LISP::RESTART-LISP SAVE-LISP))





More information about the mcclim-devel mailing list