Erick writes:
> To remove a binding, you have to pass a null string as binding. For
> instance:
> (bind .b "<2>" '(format #t "Button 2 pressed\n")))
> ....
> (define old-binding (bind .b "<2>"))
> (bind .b "<2>" "") ;; kill the binding
> ....
> (bind .b "<2>" old-binding) ;; restore it
Don't forget that giving bind an empy string removes the previous
binding for that widget and it will default back to the class binding.
If you wan't to make sure _nothing_ happens when the specified event
occurs you have to pass a non-empty-string that does nothing:
(bind .b "<2>" '(format #t "hi!\n")) ;; show event happened
(bind .b "<2>" "") ;; use class binding
(bind .b "<2>" "()") ;; do nothing
Another way to make sure nothing happend would be to remvoe both the
widget and class bindings, but that will affect all widgets of that
class and is probably not a good thing to do.
--
Grant Edwards
Rosemount Inc.
grante_at_rosemount.com
Received on Fri Sep 30 1994 - 17:36:40 CET