Tkinter unbinding

Roger rdcollum at
Fri Dec 19 15:23:55 CET 2008

> Note that I took out the lambdas and gave event arguments to the
> functions; if you did that on purpose, because you need to call the same
> functions without events, then just ignore that...
> SO, the other workaround, which I've used, is to bind the event to a
> generic function, and have that generic function conditionally call
> the functions you want. I'll go back and try to make an example from
> your example. -Chuckk

Thanks Chuckk!  You've done exactly what I did so far.  I went through
the source in and had an inkling of what the unbind
function was doing.  I believe, and please correct me if I'm wrong,
in:'bind', self._w, sequence, '') , the '' is unbinding
all methods and I believe the self.deletecommand(funcid) is a
workaround for a memory leak otherwise.  Perhaps'bind',
self._w, sequence, funcid) would work but that's a pure guess.  I
would have liked to investigate the tcl source directly to see if I
could develop a workaround through a but that was hitting a
wall in terms of any documentation I could research.  I'm interested
in any workaround you may have however!

You now, I really considered going over to wxwidgets, and I definitely
want to try it after the current app I'm developing is complete, but
I've so much experience with Tkinter now after banging my head against
a wall for months (productive months mind you) on various projects,
it's like an old persnickety friend you just can't give up.  =)

Thanks a ton!

More information about the Python-list mailing list