开发者

Blackberry Screen navigation from MenuItem

开发者 https://www.devze.com 2023-01-24 08:36 出处:网络
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.

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

精彩评论

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