On Wed, 12 Mar 2003, Christian Reis wrote: > 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? :-)
At this time, that's not an option. (But you know that from our other conversations, ;-) > 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? Yes, input_add does return an ID. I'm not sure it can be used with signal_handler_block, though. I'll find out. If that *does* work, *that* is the "right way" to do this. Oh, yeah. > 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'. Yep. -- "Never try to write to ROM - it wastes your time and annoys the ROM." Jon Nelson <[EMAIL PROTECTED]> C and Python Code Gardener _______________________________________________ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
