Originally Posted by Dougsg38p
You cannot access the UI from a non-event thread.
You either need to pass this work off to the event thread, or acquire the event lock.
See UiApplication.invokeLater() for a clue. You can place the dialog in a Runnable class, then pass to invokeLater().
Thanks, your way make it run fine.
But when I debug i encourage another problem with UiApplication.invokeLater().
here my code:
(1) if(var == 0)
public void run()
I have inserted break point into (1) and (2), but when I debug, it always jump to (2) first without check the condition if(var == 0). I don't understand, please help me, thanks !