I’m trying to set up a view that gives feed back via progress bar while it carries out a task, by incrementally sending updates to the view.
I don’t know much about multithreading, so I’m trying to do this without using it. Is there a way to force a view to update? It seems like there should be something to do this, cause I’m not really waiting for input, just giving output, and things happen one at a time – carry out computation steps, update progress bar, carry out more steps, update bar, etc.
Thanks for any help with this.
Easiest way is to divide the task into small chunks and perform them on a timer so the runloop can process UI events:
A background thread makes for a much better user experience though, and may actually be simpler depending on what operation you are performing.