“pushModalScreen called by a non-event thread” thrown on event thread

后端 未结 3 1345
梦毁少年i
梦毁少年i 2020-12-21 08:53

I am trying to get my Blackberry application to display a custom modal dialog, and have the opening thread wait until the user closes the dialog screen.

fina         


        
3条回答
  •  无人及你
    2020-12-21 09:28

    Use this:

    UiApplication.getUiApplication().invokeAndWait(new Runnable() {
        public void run() {
            pushScreen(new MyScreen());
        }
    });
    

提交回复
热议问题