[ltk-user] patch to make children actually do something
Jason Miller
jason at milr.com
Thu Nov 14 21:43:02 UTC 2013
For treeviews:
#'(setf children) will set the children, but #'children issues the
command without reading the value! This fixes that
-------------- next part --------------
diff --git a/ltk.lisp b/ltk.lisp
index 127e309..af9b1a5 100644
--- a/ltk.lisp
+++ b/ltk.lisp
@@ -2638,10 +2638,16 @@ bind ~a <Configure> [list resetScroll ~a]
(defgeneric children (tree item))
(defmethod children ((tree treeview) item)
- (format-wish "~a children ~a" (widget-path tree) item))
+ (format-wish "senddatastrings [~a children ~a]" (widget-path tree) item)
+ (let ((names (read-data))
+ (items (items tree)))
+ (mapcar (lambda (name)
+ (find name items :key #'name :test #'equal))
+ names)))
(defmethod children ((tree treeview) (item treeitem))
- (format-wish "~a children ~a" (widget-path tree) (name item)))
+ (children tree (name item)))
+ ;(format-wish "~a children ~a" (widget-path tree) (name item)))
(defgeneric (setf children) (val tree item))
(defmethod (setf children) (val (tree treeview) item)
More information about the ltk-user
mailing list