Advanced Search
Mail us
Home    Manuel    Links    Faq    Submit a tcl/tk Reference    Contact Us

    Some examples tcl/tk codes     Man of Bwidget     Man of blt     mkwidget screenshots     TkOgl     Video Demo real.

  change a binding while it is being executed?
 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.