Problem with BLT busy cursor on NT

Greg McFarlane gregm at iname.com
Wed Jul 7 03:32:07 EDT 1999


Has anyone noticed that, under some circumstances, the BLT busy cursor
is not displayed under NT?  The (tcl) code below demonstrates this. 
(The equivalent python has the same problem, so it is not a problem
with python, but someone on that mailing list may know that answer.)

Clicking on the top "Show busy" button changes the text of the button
as well as displaying the busy cursor for two seconds, as expected. 
Under Unix, clicking on the second button does the same thing, but
under NT, it only changes the text of the button for two seconds and
does not display the busy cursor.

It seems that, under NT, to actually get the busy cursor displayed,
the interpreter has to return to the main loop after a call to
blt::busy.  If there is a long lasting calculation or a blocked read,
etc, then the cursor will not be not changed.  I would have thought
that the call to "update idletasks" would have been enough to flush
out the cursor change.

Has anyone seen this before?  Is it a bug in BLT or a limitation
of NT?

==================================================================
package require BLT

proc startBeingBusy {} {
    .b1 configure -text "I am busy..."
    ::blt::busy hold .
    update idletasks
    after 2000 stopBeingBusy
}

proc stopBeingBusy {} {
    ::blt::busy release .
    .b1 configure -text "Show busy"
}

proc beBusy {} {
    .b2 configure -text "I am busy..."
    ::blt::busy hold .
    update idletasks
    after 2000
    ::blt::busy release .
    .b2 configure -text "Show busy"
}

button .b1 -text "Show busy" -command startBeingBusy
pack .b1 -padx 40 -pady 40

button .b2 -text "Show busy" -command beBusy
pack .b2 -padx 40 -pady 40
==================================================================

-- 
Greg McFarlane:    INMS Telstra Australia (gregm at iname.com)
Today's forecast:  Sunny, with occasional cloudy periods and a chance
		   of precipitation in some areas.




More information about the Python-list mailing list