On Wed, Mar 12, 2003 at 08:50:06AM -0600, Jon Nelson wrote:
> > Can't this while become:
> >
> >     while self.check_events and gtk.events_pending():
> >       gtk.mainiteration()
> >
> > And we use the check_events flag like I described before?
> 
> yes it can, but it (essentially) does the exact same thing.

With a slightly lower ugli-T-ness<tm> rating, and only 3 added calories.

> I'll verify your soln. works, but it's essentially the same.
> What I'd *really* like is to find out if there is a way to accomplish
> what I'm trying to do here.
> 
> The user-perceivable problem is that (assume
> do_real_work_with_data_read_from_file takes perhaps a minute), the
> application is "frozen" because mainiteration can't be called to update
> progress bars, show messages, update cursors, etc...

Well, calling mainiteration *inside* a callback is bound to be tricky
and produce races and deadlocks. I'm not sure ig gtk2 handles this
better, but maybe some gtk2 ninja can step up and give you the ultimate
reason to upgrade? :-)

I don't know of any way to block a callback that doesn't use
emit_stop_by_name() and in your case it's not applicable (since you're
not using signals). There's also signal_handler_block, etc, but do you
get an ID back when you do input_add?

The way Steve put it is the way things tend to be fixed in a binding.
Unless you have a lot of push to go over to gtk-land and complain about
something being complicated, it takes time and effort to get your
requests to trickle over into the main codebase. We end up using
`whatever works'.

Take care,
--
Christian Reis, Senior Engineer, Async Open Source, Brazil.
http://async.com.br/~kiko/ | [+55 16] 261 2331 | NMFL
_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to