On 9/8/07, Jimmy <[EMAIL PROTECTED]> wrote:
> Hi, I want a progress bar to increase automatically, so I wrote code
> like this:
> current = 0
>                 while True:
>                         if current == 100:
>                                 current = 0
>                         self._gauge.SetValue(current)
>                         time.sleep(0.1)
>                         current = current + 1
>
> I put this in the __init__ section, however, the window will never
> show! and there are
> error message like this:
> ** (python:28543): CRITICAL **: clearlooks_style_draw_handle:
> assertion `width >= -1' failed
>
> can anyone tell me why this happen?Thanks :)
>

Because you are blocking the event loop so while you are doing this
your application isn't running and not painting. Use a wx.Timer
instead.

Why are you lying to your users about what you are doing and how long
it is taking anyway?
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to