[pygtk] The Right Way to communicate between windows

Jens Knutson jens.knutson at gmail.com
Wed Apr 8 03:58:27 WST 2009


Hi,

I'm having trouble figuring out The Right Way(TM) to get separate
windows in my app to communicate between each other.  Here's what I'm
trying to do:

1.  'A' is my main app class with the main window of my app.  This
window contains a Kiwi ObjectList.
2.  A creates object B, and B then opens its own window.
3.  When the user is done entering some input into B and hits the OK
button, I want B to then trigger A's ObjectList to reflect the updated
data the user just entered from B.

Also, I'm using gtkbuilder to define almost all of the UI &
accompanying callbacks, and I'd prefer to keep it that way as much as
possible.

I was originally just using a dialog with .run(), but I don't want to
block anything in the main window's UI, so that's no good.  I've come
up with a few other ideas about how to do this, but they all feel like
nasty hacks.

What's the correct thing to do here?

Thanks!

Jens K.


More information about the pygtk mailing list