On Fri, 12 Oct 2001, James Henstridge wrote:

> >     sp.bar_update("carico", 0.9)
> >     time.sleep(0.1)
> >     gtk.mainloop()

Heh. Funny that I should be trying a similar thing. My situation is a
bit different: I've got the mainloop running already, and
in a loop of functions I need to update the display and then sleep. I do
this by using James' suggestion of mainiteration and it worked for me.

_However_, doing the _final_ update of the statusbar (where I set the
value to 1 and changed the label to say finished, it didn't. The
statusbar was never drawn in it's full and the label wasn't updated.

To get this to work, I did the UI updates and then did gtk.idle_add() of a
function that performed the rest of the task. This worked, but using
events_pending()/mainiteration() simply hung on me. Isn't that odd?

[ gtk.idle_add() is probably the most important function to look at then
"things seem darned unreasonable". It will let you work around a lot of
problems with the mainloop paradigm. ]

Take care,
--
Christian Reis, Senior Engineer, Async Open Source, Brazil.
http://async.com.br/~kiko/ | [+55 16] 272 3330 | NMFL

_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk

Reply via email to