Hi everybody, "Daniel Bickett" <[EMAIL PROTECTED]> a écrit dans le message de news: [EMAIL PROTECTED] > Instead of having the Controller query the Subject (not exactly > plausible), I had it wait for a signal (threading.Event) as set by the > Subject. You could also have it query a queue, as that is a generally > accepted and thread-safe object to use, but for this purpose I chose an > event and a global variable. (I'm aware that some would look down on > this, but I didn't see a problem, as it was only modified by one thread > amd printed by the other.) > > Daniel Bickett
Your approache is a little different, since the subject is responsible of emiting a signal/event to the controller. I wish to avoid this situation. The reason is that i want to write an application where the model (the system) is completely unaware of the view and the controller. This way, i could easily change the way the model and the view interact, while the code of the model remains unchanged. I don't know if this is possible, that's why i'm trying to solve this problem with threads ! and hope someone could help me :) Thanks to all. -- http://mail.python.org/mailman/listinfo/python-list