cancel
Showing results for 
Search instead for 
Did you mean: 

How can I switch screen from Model class in response to external event (Backend event)?

BParh.1
Senior III

How to switch to particular screen from Model::tick()?

Scenario:

  1. Switching from start up screen to main screen upon receiving external hardware event
  2. Switching from particular active screen (non startup screen) to other screen in response to external hardware event.
1 REPLY 1
Romain DIELEMAN
ST Employee

I'll comment a bit late as this question has been dug up in another post.

It is not possible at the moment (a user might have shared a workaround but I have not found it).

In your scenario what i would recommend would just be to implement dummy transitions in one of the screens to generate all the application.goto() functions needed and add a function receiving the hardware input (see backend communication article) which then calls the relevant screen transition. You'll have to implement that same function in all screens of your project (we are aware this is annoying and are working on it :grinning_face_with_sweat:).

/Romain