Hi, the scale of the program in the bottom doesn't work as I want. I want the :command lambda to be called whenever the scale changes.
Is there a different way of being informed of the changes?
In ltk.lisp:1761 the tk command scale is actually called with the option "-command" I don't understand the code enough to fiddle in my callback without breaking the existing one.
;; test program (not working as expected): (require :asdf) (require :ltk)
(defpackage :mk (:use :cl :ltk)) (in-package :mk) (with-ltk () (let* ((f (make-instance 'frame)) (s (make-instance 'scale :orientation :horizontal :master f :command (lambda () (format t "SCALE NOW ~d~%" (value s))) ;; why can't i write command here )) (b (make-instance 'button :text "get" :master f :command (lambda () (format t "SCALE IS ~d~%" (value s)))))) (pack f) (pack (list s b))))
Regards, Martin