-Q10.B.3- change a binding while it is being executed?

From: -X-  How, in Tk, can I XXX:

A10.B.3. As of June, 1992, this was not a safe thing to do in Tk.  It was
put on the bug list by John Ousterhout to be fixed in a future version.

The solution for now is not to change the bindings, but to change
something in the code they execute.  For example, keep a state variable
that indicates which binding you'd like, but always have the binding
call a given procedure.  Then that procedure checks the variable and
executes one piece of code or another.  Or, you could just make the
binding's command "eval $cmd" and then change the variable "cmd"
depending on your application's state.
Go Back Up

Go To Previous

Go To Next