[ltk-user] Set xscrollcommand to a lisp function
Vitaŭt Bajaryn
vitaut.bayaryn at gmail.com
Mon Jun 4 16:30:01 UTC 2012
On 2 June 2012 21:04, Vitaŭt Bajaryn <vitaut.bayaryn at gmail.com> wrote:
>
> How can I set :xscrollcommand configure option to a lisp function?
I figured I can do something like that:
;;;;
(in-package #:ltk)
(defun (setf x-scroll-command) (fun widget)
(let ((name (create-name)))
(add-callback name fun)
(format-wish "~a configure -xscrollcommand {callback ~a}"
(widget-path widget) name)))
(export 'x-scroll-command)
;;;;
But callback needs additional parameters and I don't know how to call
a function in tcl.
More information about the ltk-user
mailing list