[ltk-user] tk-princ changed

Daniel Herring dherring at tentpost.com
Mon Nov 14 04:00:44 UTC 2011


I bumped into problems with SVN revision 261.  It added tkescaping to 
tk-princ, where there previously was none.

This change broke part of treeview-heading.  A patch to make 
treeview-heading work with the new tk-princ is attached.

example: (tk-princ "{stuff}")
old result: "{stuff}"
new result: "\{stuff\}"
new code for old result: (tk-princ '("stuff"))


The docstring for tk-princ says
"Like princ (format ~a), but convert a lisp list to a Tk list."
but the code is now very different.

Should the docstring change to match the new code, or should the code be 
reverted to match the docstring?

Thanks,
Daniel
-------------- next part --------------
From 15dc5a09d1ad5b62df5eb559579f20ada7b2fa45 Mon Sep 17 00:00:00 2001
From: D Herring <dherring at at.tentpost.dot.com>
Date: Sun, 13 Nov 2011 22:43:39 -0500
Subject: [PATCH 1/2] fix treeview-heading

---
 ltk/ltk.lisp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/ltk/ltk.lisp b/ltk/ltk.lisp
index 25ca182..9bb2b00 100644
--- a/ltk/ltk.lisp
+++ b/ltk/ltk.lisp
@@ -2872,7 +2872,7 @@ set y [winfo y ~a]
        (let ((cbname (format nil "~a:~a" path column)))
          (add-callback cbname command)
          (setf (getf options :command)
-               (concatenate 'string "{callback " cbname "}"))))
+               (list "callback" cbname))))
      (format-wish "~a heading ~a~{ -~(~a~) ~/ltk::tk-princ/~}"
                   path column options))
     (t ;; query
-- 
1.7.5.1



More information about the ltk-user mailing list