[ltk-user] Q about canvas item handles
Why isn't HANDLE (for canvas items) exported from :ltk? "Hand to forehead" when I figured out why the following didn't work. (defpackage :p (:use :cl :ltk)) (in-package :p) (defun test () (let* (... (c (... 'canvas ...)) (o (make-instance 'canvas-oval :canvas c :x0 ...))) (itemconfigure c (slot-value o 'handle) ...))) Alternatively, would it make sense to have (defmethod itemconfigure ((canvas canvas) (canvas-item item) ...)) do the right thing? Possible patch attached. Thanks, Daniel
Hi Daniel, just call configure on the item: (configure c :fill :red) HTH, Peter
On Tue, 14 Jul 2009, Peter Herth wrote:
Its too early... if o is the canvas item, it should be (configure o :fill :red) of course...
Yes, that works quite nicely. I still ask you to consider my patch. It cleans up string handling a bit, and there's little reason for itemconfigure not to handle all item types. Thanks, Daniel
participants (2)
-
Daniel Herring
-
Peter Herth