I would like to use Timer inside Scout classes to change UI of scout elements.
For example : I have some label and I would like to change value after some time :
Timer timer = new Timer();
timer.schedule(new TimerTask() {
@Override
public void run() {
myLabel.setValue("some value")
}
}, 1000 * 4);
This give me error :
Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException: queueing rwt runnable from outside scout thread
witch I understand because you shouldn't change UI outside its thread. But now I have trouble to return on UI thread because it is not SWT thread nor SWING thread. (Scout UI is wrapper for both)
How can I run Timer in Scout, or how to get UI thread in Scout ?
Marko