Progress Dialog

Dear List

I am having an issue with this dialog box that does not wish to update!
Here is the code of the Box
app = wx.PySimpleApp()
prodia = wx.ProgressDialog(“Feed Progress”,“Time Remaining”,len(items_to_do),style = wx.PD_AUTO_HIDE| wx.PD_ELAPSED_TIME | wx.PD_REMAINING_TIME)
Now i am calling update from worker threads and it won’t process the events! They are within scope! However they cannot update it!

Can someone please explain me why?

Thanks
James

···


http://search.goldwatches.com/?Search=Movado+Watches
http://www.jewelerslounge.com

http://www.goldwatches.com

chris botos wrote:

Dear List

I am having an issue with this dialog box that does not wish to update!
Here is the code of the Box
app = wx.PySimpleApp()
prodia = wx.ProgressDialog("Feed Progress","Time
Remaining",len(items_to_do),style = wx.PD_AUTO_HIDE| wx.PD_ELAPSED_TIME |
wx.PD_REMAINING_TIME)
Now i am calling update from worker threads and it won't process the events!
They are within scope! However they cannot update it!

Can someone please explain me why?

Hi James,

(Anyone, please correct me if I'm wrong, but ...) I believe the Update
call must be made from the main thread, as do any calls to any window.

Correct.

  To make this happen from a worker thread you can use wx.CallAfter.
See:
    CallAfter - wxPyWiki

See also LongRunningTasks - wxPyWiki

···

On Jan 6, 2008 6:40 PM, James Matthews <nytrokiss@gmail.com> wrote:

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!