Am Donnerstag, 25. Januar 2007 02:00 schrieb Mystilleef: > Multiple instances of your application can share the same mainloop. All > you need to do is design an "InstanceManager" class that creates new > instances of your application. "InstanceManager" runs on the mainloop. > "InstanceManager" should have functions to create and keep track of all > instances of your application, perhaps stored in a list. When there are > no more instances of your application in the list, just quit the > mainloop. There is no threading needed. Of course each instance of > your application will have a reference to "InstanceManager" and the > methods (e.g. new_window, get_instances, focus_window, etc) it exposes. > Thus, "InstanceManager" becomes a mediator, and you can use it to > communicate with other instances, through the methods it exposes. I've > used this pattern successfully in one of projects.
Hi! Sounds interesting. But I don't understand it. How do the instances (processes) communicate? How does the event get passed to the child process? Thomas -- Thomas Güttler, http://www.tbz-pariv.de/ Bernsdorfer Str. 210-212, 09126 Chemnitz, Tel.: 0371/5347-917 _______________________________________________ pygtk mailing list [email protected] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
