<br><div class="gmail_quote">Hi,<br>the scale of the program in the bottom doesn't work<br>as I want. I want the :command lambda to be called<br>whenever the scale changes.<br><br>Is there a different way of being informed of the changes?<br>
<br>In ltk.lisp:1761 the tk command scale is actually called with<br>
the option "-command" I don't understand the code enough to<br>fiddle in my callback without breaking the existing one.<br><br>;; test program (not working as expected):<br clear="all">(require :asdf)<br>(require :ltk)<br>
<br>(defpackage :mk (:use :cl :ltk))<br>(in-package :mk)<br>(with-ltk ()<br> (let* ((f (make-instance 'frame))<br> (s (make-instance 'scale<br> :orientation :horizontal<br> :master f<br>
:command (lambda ()<br> (format t "SCALE NOW ~d~%" (value s)))<br> ;; why can't i write command here<br> ))<br> (b (make-instance 'button :text "get" :master f<br>
:command (lambda ()<br> (format t "SCALE IS ~d~%" (value s))))))<br> (pack f)<br> (pack (list s b))))<br><br>Regards, Martin<br><font color="#888888">-- <br>Martin Kielhorn<br>
Randall Division of Cell & Molecular Biophysics<br>
King's College London, New Hunt's House<br>Guy's Campus, London SE1 1UL, U.K.<br>tel: +44 (0) 207 848 6519, fax: +44 (0) 207 848 6435<br>
</font></div><br><br>