[Pyobjc-dev] Problem with NSText:setString
Brought to you by:
ronaldoussoren
From: Daniel L. d. S. <dan...@gm...> - 2011-06-13 12:08:03
|
Hello, I have a GUI application built with interface builder. One of the windows has a NSTextView in it. I connected it to an object also referenced in the interface builder file. The goal is to write to the NSTextView from a background trhead that does some task. I launch the thread with a call to NSThread.alloc().initWithTarget_selector_object_() The behaviour I am getting is erratic. Most times it blocks on the call to the NSTextView's setString_() method and the application hangs. If I run the code on the main thread it runs fine. How do I do this from a background thread ? The idea is to keep the application responsive. I am on : snow leopard (10.6.7) pyObjc (I think it is 2.2b3 (can you tell me how to really check the version ?)) Many thanks |