overriding tks text insert method

Joseph Andrew Knapka jknapka at earthlink.net
Wed Sep 5 06:01:48 EDT 2001


Christof Ecker wrote:
> 
> Hi Joseph,
> 
> thanks for your comments. I have been playing with your code yesterday and I
> discoverd an additional problem:
> what I need is to execute a cleanup procedure AFTER text has been inserted or
> deleted. If you override Tks default binding by an input handler routine, the
> handler will be executed BEFORE the default binding.
> 
> This is because, the default bindings are bound to the text class, whereas the
> "user"-bindings are bound to the class instrance and have therefore higher
> priority and are therefore executed first.
> 
> Any idea ?

If you bind to <KeyRelease> instead of <Key> you should get
the release events after the insert has occurred.

Cheers,

-- 
# Joe Knapka
# "You know how many remote castles there are along the
#  gorges? You can't MOVE for remote castles!" - Lu Tze re. Uberwald
# Linux MM docs:
http://home.earthlink.net/~jknapka/linux-mm/vmoutline.html




More information about the Python-list mailing list