Ed,

This patch fixes the traceback caused by calling the UI directly from a 
thread. However, it may not be the correct fix, as if something goes 
wrong in posting to twitter, the user's message is lost. But it 
highlights what was wrong (can't clear self.edtPost from within 
_postToTwitter(), as that is not called by the main thread).

Interesting that before this fix, edtPost did indeed get cleared, before 
the exception actually happened...


Index: ui/tweezerForm-code.py
===================================================================
--- ui/tweezerForm-code.py      (revision 43)
+++ ui/tweezerForm-code.py      (working copy)
@@ -467,6 +467,7 @@
  def sendPost(self, *args):
         thd = threading.Thread(target=self._postToTwitter, args=args)
         thd.start()
+       self.edtPost.Value = ""


  def _postToTwitter(self, mthd, *args):
@@ -478,7 +479,6 @@
                 ret = e
         if ret:
                 self._toProcess.append(ret)
-               self.edtPost.Value = ""



Paul


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]

Reply via email to