Hello,
I've only been playing with pygtk for a few days now, and I've just
joined the list, so I'm still trying to wrap my brain around it.
Could anyone explain the structure of the event loop to me? Or at
least point me at the right documentation?
What I don't understand are the non-modal dialog boxes in GtkExtra. I
can write a menu item which will call a python callback which will pop
up a dialog box (say, a file selection). That box will sit there,
waiting for input, before returning the result to python.
While that box is sitting there, I can access the menu again and
create another dialog box, which will pop up happily. If I reply to
the new box, then reply to the old box, everything works as expected.
However, if I reply to the old box first, then the new one, the reply
to the new box is ignored. So there's a stack buried in there
somewhere.
Why doesn't the existance of the first dialog box tie up the python
interpreter, preventing the second box from being created? How does
the gtk event-loop get control back from python, if python is waiting
for the result of the dialog? Where are the continuations being
stored? How should I think of this, if I want to make sense of it?
(By the way, this seems like something which could be done in a very
flashy way with a combination of Stackless Python and microthreads.
Has anyone played with those packages enough to tell me if this vague
intuition is correct?)
Thanks,
--Johann
--
Johann Hibschman [EMAIL PROTECTED]
To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]