[wxPython-users] Re: wxProgressDialog problems
Robin Dunn
robin at alldunn.com
Sat Feb 23 15:56:11 PST 2008
Larry Bates wrote:
> Robin Dunn wrote:
>> Larry Bates wrote:
>>> Thoughts?
>>
>> Do the other code in a thread, and make the callback use wx.CallAfter
>> or post an event so the update of the progress dialog can be done in
>> the gui thread. If the cancel button was pressed then set a flag that
>> the download thread will check periodically so it knows to stop (or
>> send the message in some other thread-safe way).
>>
>>
> Real newbie here. It sounds like this would be the best way:
>
> > or post an event so the update of the progress dialog can be done in
> > the gui thread.
>
> I "really" tried on this one, but it exhibits the same behavior. Can't
> ever click on the Cancel button. See sample code below.
>
> Thanks for all your help.
You still are not calling the app's MainLoop method. And you seem to
have missed the "Do the other code in a thread" part of my comment.
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
More information about the wxpython-users
mailing list