« MBS Real Studio Plugi… | Home | MBS Real Studio Plugi… »

Thread GUI Access

You may have read that accessing GUI elements in a thread is a bad idea. In the Real Software blog have been articles like Doing Progress Right and Detecting UI Access from Threads.
But well I don't like this thing with running a timer to update GUI. I want to update the GUI from the thread. There even was somewhere a feature request to make some methods like progressbar.value working well on a thread.
As this is still missing and setting progressbar.value on a thread still makes trouble, I added a few utility methods to our plugins:
  • Label.SetTextThreadSafeMBS
  • Progressbar.SetMaximumThreadSafeMBS
  • Progressbar.SetMinimumThreadSafeMBS
  • Progressbar.SetValueThreadSafeMBS
  • RectControl.SetEnabledThreadSafeMBS
  • RectControl.SetVisibleThreadSafeMBS
I hope those help people to move their code more easier to Cocoa, make it work right and thread safe. The biggest plugin in space...
16 12 12 - 21:15