Realbasic progress bar not updating
But there are right and wrong ways to do this, and most of the time I see progress code, I see the wrong way.
So, once you are running on a separate thread, you have to go through an extra hoop to make sure that your UI change is processed on the UI thread. To get your command processed on the UI thread, use the Control.
I had also tried the solution mentioned here but it doesn't work: How do I update a progress bar in Cocoa during a long running loop?
Can someone help to see where is the problem in my source code? Simple Progress Bar.m If your application has a graphical user interface, it is recommended that you receive user-related events and initiate interface updates from your application’s main thread.
The dialog waits a configurable amount of time before deciding whether the task at hand is long enough to warrant the dialog. When the current value of the progress bar is greater than or equal to the maximum, as specified in the constructor, the progress monitor dialog closes.
If you need to close the progress monitor early, you can call the while on the event dispatching queue.