I have an application where a thread is started to do a lengthy calculation. At the same time a progress wheel is made visible in the window to indicate that something is happening. And, when the thread ends, the progress wheel is made invisible again. So far, so good.
Now, I’ve just noticed that, if while the thread is running, I minimize the window and then bring it back again, the progress wheel has stopped turning. Everything else is working as normal. Is this a bug, or is there some event that I need to handle when the window is un-minimized.
However, in Cocoa, spinning progress indicators aren’t always animated.
Out of curiosity, see if you can get it started again with the declare to animate. startAnimation:
The solution I found is to make the ProgressWheel a control set, so after the window is restored, you can create a new ProgressWheel, which will rotate normally, and make the previous one invisible.
In my test I create only one new progressWheel, but the process could be repeated as often as needed, by keeping count of the previous wheels.
I have attached the project to this bug report :
46028 - ProgressWheel gets frozen after the window has been minimized and restored
Status: Needs Review Rank: Not Ranked Product: Xojo Category: N/A
[quote=300445:@Robert Weaver]Thanks for verifying that.
I think I’ve found a simpler workaround. I’ve added a restore event handler to the window and have put this code into it:
'Toggle visibility on window restore
ProgressWheel1.Visible = not ProgressWheel1.Visible
ProgressWheel1.Visible = not ProgressWheel1.Visible
[/quote]