2021-11-16 02:31 AM
From my understanding, in the MVP model implemented by touchGfx, the view is intended to manage the UI element of a screen while the presenter is intented to manager the logic running in background (for instance hiding/showing elements based on information received from the model).
My question is: where should we put the calls to GotoxxxScreen() ? If i follow my understanding, i would put it in the presenter (or eventually in the model), but if i look at the various example as well as the calls implemented by touchGfx Designer, they are put in the view.
Moreover the view have a shortcut to the application() while the presenter must go through static_cast<FrontendApplication*>(Application::getInstance())
So i'm a bit lost on where is the best/advised place to programatically switch screens.
Thanks,
Laurent
Solved! Go to Solution.
2021-11-18 12:07 PM
2021-11-18 12:07 PM
2021-11-19 09:04 AM
Thanks a lot for your reply. This is indeed how i did. Implementing the calls to "static_cast<FrontendApplication*>(Application::getInstance())->gotoXxxScreenNoTransition();' from within the various presenters.
2021-11-19 10:21 AM
No problem.
Sharing is caring.