A problem to add binding to entry widget
There is a problem in add a binding to the entry for the <KeyPress> event.
I use the add-binding routine suggested by the author as below:
(define (add-binding widget event binding where)
(let ((old (bind widget event)))
(if (null? old)
;; Try to look if a class binding already exists for this event
(set! old (bind (winfo 'class widget) event)))
(bind widget event
(if (null? old)
binding
(if (eqv? where :before)
`(begin ,binding ,old)
`(begin ,old ,binding))))))
Say I have a entry widget .a and I added a bind as:
(add-binding '.a "<KeyPress>" '(format #t "AAA") :after)
The binding is fine except key '\'. When I type '\', stk gives me error
of "end of file inside list". However, without adding the binding, key
'\' is as normal as any other keys.
I could not find the reason because the tracer shows me the bottom of the
stack.
Thanks for any help.
Fred Xia
Received on Tue Apr 25 1995 - 19:14:13 CEST
This archive was generated by hypermail 2.3.0
: Mon Jul 21 2014 - 19:38:59 CEST