If you aren't sure what thread you are running on, you can check the value of Invoke Required (if your class is a System. Invoke() function to make sure the update is processed on the UI thread for the control you are working with.
Realbasic progress bar not updating Young adults on webcams
loop is running on the main thread, and thus UI updates won't appear until you yield back to the runloop.
You're also going through that loop so quickly that even if you properly dispatched that to a background queue, you wouldn't experience the progress view changing as you iterate through your loop. via GCD or operation queue) and then dispatch UI updates back to the main thread, which is now free to do UI updates.
I am implementing a Cocoa Application which is just a simple progress bar that starts when I press a button.
The situation is: I can see Animation is Start and Stop when I press the button, but the progress bar will not update the value.
As Marc said, you want to make sure that you spin off a new thread to do your long running computation.
That way the User Interface thread (which is the one that has to do all the screen updates) can redraw the progres bar whenever you change the percent complete.
However, you absolutely must not interact with any controls from within the Thread.
This poses an obvious problem for updating a Progress Bar. The setup is a little on the tedious side, but it is necessary.
Sorry that I haven't updated this blog recently, but my wife had double knee replacement surgery on June 15.
I don't drive a car (I haven't done so for twenty years or more), and - until this past week - my wife hasn't been able to drive either, so life has been a bit difficult (and would have been a lot more difficult if it had been for the kind helpfulness of some very good friends).
This approach helps avoid synchronization issues associated with handling user events and drawing window content.