Hi everyone,
It's been a while since I wrote on this list. I continue reading the
list but have been busy with projects other than REALbasic things.
Anyway, I'm experimenting with putting a ProgressWheel control in a
little app of mine. The point would be to let the user know that work
is in progress, something that takes a few seconds to complete. So I
make it visible when the action of my button starts executing and
invisible when it's done. What I see is that, well, I never see it.
The problem is that my UI is blocked while the action is executing.
No repaints of the controls occur. So coming from Java I put the
action code in a separate thread, thinking this would help, but no; I
still don't see the progress wheel. I don't have any For, Do or While
loop in my action code, which according to the Thread documentation
automatically give time to other threads.
The next thing I tried is peppering my code with calls to
App.YieldToNextThread(). Aside from seeming inelegant, this did not
help much. I can see the progress wheel become visible now, but it's
not animated at all.
Finally I tried lowering the priority of my action thread to 1,
thinking that if it's lower than the UI thread, that the progress
wheel would animate. This helped a little bit, I see a couple broken
down steps in the animation during the few seconds that the action
lasts, but not enough to make the progress wheel useful.
So the question is, what is a good strategy to give time to the UI to
update during a long operation in REALbasic?
Steve
--
Steve Roy
<http://homepage.mac.com/sroy>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>