Odd progress bar window behaviour
-
Hi Frederik, Hi RoboFont users,
I am working on a progress bar window to use inside an extension for processes that requires more than a bunch of seconds to be accomplished.
I’d like to have in this window some indicators more than just the progress bar, like percentage, process description, time counter and so on.
So, this is the first version of the progress bar that I wrote:
https://gist.github.com/roberto-arista/e2f82669cff09c64960aBut if you run it, you can easily notice that percentage and time counter do not update.
At least not in my Robofont or Drawbot installations.Instead, if I hide and show the window each cycle of the for loop, the two
TextBox
objects are updated:
https://gist.github.com/roberto-arista/ee737aa745d776f84a22What’s happening here?
Am I doing something wrong?Thanks
-
It works!
Thanks :)
-
Due to optimisations a text will not update directly cause it is receiving lots of updates in a short time.
You will have to force the text view to update
instead of using the private
_nsObject
I would encourage you to usegetNSTextField()
good luck