Re: orbit2 build, orbit1 work_pending()



Hm... apparently I still don't understand how the glib main loop is supposed to
work. The docs say "events are global", which I took to mean that if a handler
is installed for an event source, it would be invoked no matter who called
g_main_run(). However this doesn't make sense in the gtk usage of calling it to
make modal dialogs -- events on the main window are not handled after the 2nd
call. Anyone have a clue?

I'm seeing a similar behavior trying to get orbit and gtk to work together.
Here's my latest (python) test code:

  n = 100

  while n:
    if gtk.events_pending():
      gtk.mainiteration()
      n = n - 1
    else:
      time.sleep(0.01)

  print "entering corba loop"
  poa._get_the_POAManager().activate()

  orb.run()

I was thinking this would ensure the gtk event handlers are installed when
orbit invokes the main loop (since calling _gtk.gtk_init() wasn't doing
anything).

This will bring up the main gtk window, and after a few events it will drop to
orbit. However then gtk locks up -- much like a modal dialog.

b.c.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]