[pygtk] Blocking codes

Rafael Villar Burke pachi at mmn-arquitectos.com
Mon Mar 13 18:34:34 WST 2006


Thierry Lam escribió:
> Let's say I have the following gui codes:
>
>
> Popup_window1()
>
> Popup_window2()
>
>
> Both of the above will start 2 popup windows back to back. Is there a
> way to block the code at Popup_window1() until a button is pressed in
> that window. Once that button is pressed, then I want the
> Popup_window2() to start.
>   
A poor man's solution I'd take to approach that problem is adding some 
state information to the Popup_window1 method. A state variable would be 
checked before running the code in Popup_window1 and it would allow 
getting Popup_window2 called when the state changes after pressing the 
desired button. I.e. that button changes state from "don't execute 
Popup_window1 code" to "run Popup_window2 code".

Regards,

Rafael Villar Burke



More information about the pygtk mailing list