Tkinter woes

Steven Miale (smiale@cs.indiana.edu)
Wed, 29 Jun 1994 09:25:24 -0500

I have a Tkinter program which uses sockets. The 'older' version used 'after'
to check the socket every 20ms or so for new input; it would then update
the screen display.

I decided to use the Tk filehandler instead, like so:

w.root.tk.createfilehandler(s.sock.makefile('r'), \
tkinter.READABLE, \
s.checksocket)

w is the window, and s is a class wrapper for a special kind of socket.

The problem? First, let me state that this is an IRC client. The older
version displayed the server MOTD when I logged in. The new one shows
a clear screen, with the attached scrollbar at the lowest possible
position; if I move the bar up, I can see the MOTD. Strange, but not
terribly inconvenient so far.

However, this is the big problem: there is a command called LIST which
lists all available IRC channels. The older version would simply display
the information; the new version *appears* to hang up. That is, nothing
new is displayed in the text window. I can click on the various pull-down
menus (and see what is best described as a 'blank space' where the menu
should be); if I select one of the menu options, *then* the text window
gets updated.

I have tried putting in a delay in checksocket, thinking that this
routine might get triggered for every time a new character is available;
it doesn't appear to solve the problem. Calling update() doesn't seem
to do anything, either.

Thanks,

Steve

-- 
Steven Miale - smiale@cs.indiana.edu | Don't turn Manassas into an amusement
Indiana University, Bloomington, IN  | park. Save history - boycott Disney