Re: Dangerous update command
- From: Donald Arseneau <asnd@xxxxxxxxx>
- Date: Wed, 28 Nov 2007 11:23:40 -0800 (PST)
Mats wrote:
the GUI responsive, but was getting errors that the recursion limit....
was reached. This was nothing but the "Update considered harmful"
http://wiki.tcl.tk/1255 problem,
My code looked roughly like:
fileevent $sock readable [list Readable $sock]
proc Readable {sock} {
# WRONG !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
if {[string equal $::tcl_platform(platform) "windows"]} {
update
} else {
update idletasks
}
}
I don't think I understand why you need any kind of update there.
This is the very end of a fileevent handler. Simply returning will
cause Tcl to update and process the next event, whether a gui or a
file event. Is the problem that the gui events are queued up after
all the file events?
Donald Arseneau asnd@xxxxxxxxx
.
- Follow-Ups:
- Re: Dangerous update command
- From: Mats
- Re: Dangerous update command
- References:
- Dangerous update command
- From: Mats
- Dangerous update command
- Prev by Date: Re: 8.5b3 linked against X11
- Next by Date: Re: sleep in tcl
- Previous by thread: Dangerous update command
- Next by thread: Re: Dangerous update command
- Index(es):
Relevant Pages
|