Mac - Memory Error with TextBoxes
Robin Dunn
robin at alldunn.com
Mon Mar 3 09:08:04 PST 2008
Kenneth Bongort wrote:
> Ok, thanks! Do you have any suggestions as to how I might update my
> TextBoxes at timed intervals, without updating them directly from a
> separate thread?
For wxPython take a look at the wx.CallAfter function. It allows you to
pass a callable and args, and then uses wx.PostEvent to cause it to be
called (passing the args given) on the next iteration of the pending
events processing. It has a useful side effect of being safe to use
from non-gui threads and so is a common way to invoke GUI code from
worker threads. There are some examples here, and other places in the wiki:
http://wiki.wxpython.org/CallAfter
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
More information about the wx-users
mailing list