emt14
emt14

Reputation: 4896

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 screen if next screen does not exists
      if (nextScreen != null) { 
          nextScreen._prevScreen = this;
          UiApplication.getUiApplication().pushScreen(nextScreen);
          UiApplication.getUiApplication().popScreen(this);
      }
  }

Upvotes: 0

Views: 450

Answers (1)

Maksym Gontar
Maksym Gontar

Reputation: 22775

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

Upvotes: 1

Related Questions