I have an NSProgressBar that I use continuously in my app. I have managed to spawn off a background thread to handle processing and calls a series of routines on main thread to update the progress bar. When I run this the first time around, it works perfectly.
When the app is still open and I use further processing, the same process of initializing the progress bar is called, but the process bar starts off being 100% full as shown in this image:
My guess is that I need to call something to reset the ProgessBar but I have not found such method.
Here are my functions for setting the initial value, updating, and finishing the progress bar:
on StartProgress_(maxValue)
tell progressBar
setMaxValue_(maxValue)
setUsesThreadedAnimation_(true)
end tell
end StartProgress_
on IncrementMyProgress_(message)
progressBarInfo's setStringValue_(message)
tell progressBar
incrementBy_(1)
display()
end tell
end IncrementMyProgress_
on StopProgress_()
progressBarInfo's setStringValue_("Finished!")
end StopProgress_