开发者

Blackberry Screen navigation from MenuItem

Would the code below cause an issue if it was called from the run method of a MenuItem? My concern is whether the MenuItem is part of the UiEvent thread and if there could be some side effects.

  //Allow back and forward navigation 
  void openScreen(eSafeScreen nextScreen) {
      //remains on current s开发者_Go百科creen if next screen does not exists
      if (nextScreen != null) { 
          nextScreen._prevScreen = this;
          UiApplication.getUiApplication().pushScreen(nextScreen);
          UiApplication.getUiApplication().popScreen(this);
      }
  }


Yes, MenuItem is a part of UI thread.
No, it's not the case you should worry about UI thread.

See also: Thinking Blackberry - BlackBerry UI Threading - The Very Basics

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜