text translation, or why is this not working?

Christophe Rhodes csr21 at cam.ac.uk
Thu Apr 1 17:14:20 CEST 2004


Hi,

Consider this code:

(defvar *tree* '("foo" . ("bar" . "baz")))
(defun draw-tree (&rest args &key &allow-other-keys)
  (clim:with-text-family (*standard-output* :sans-serif)
    (clim:with-text-size (*standard-output* :smaller)
      (clim:with-translation (*standard-output* 40 40)
      (apply
       #'clim:format-graph-from-roots
       (list *tree*)
       (lambda (node s) (if (atom node) (write-string node s) nil))
       (lambda (node) (when (consp node) (list (car node) (cdr node))))
       :graph-type :tree
       args)))))

When I run this in the listener, the graph arcs get translated as I
expected, but the nodes don't.  Am I doing something wrong, is this
expected behaviour, or should the nodes be translated too?

Cheers,

Christophe
-- 
http://www-jcsu.jesus.cam.ac.uk/~csr21/       +44 1223 510 299/+44 7729 383 757
(set-pprint-dispatch 'number (lambda (s o) (declare (special b)) (format s b)))
(defvar b "~&Just another Lisp hacker~%")    (pprint #36rJesusCollegeCambridge)



More information about the mcclim-devel mailing list