cancel
Showing results for 
Search instead for 
Did you mean: 

FrontendApplication.cpp is overwritten when he code is generated by TouchGFX designer.

KNara.2
Associate III

Hi ,

I'm using TouchGFX 4.21.4 version.

I added screen changes related code (2 functions mentioned below) in FrontendApplication.cpp

void FrontendApplication::gotoScreen1NoTransition()
{
}
 
void FrontendApplication::gotoScreen1NoTransitionImpl()
{
}
Every time I run the generate code in TouchGFX this FrontendApplication.cpp is overwritten.
The 2 functions which have added manually have been removed.
Is this a bug in TouchGFX 4.21.4?
 

 

1 REPLY 1
JTP1
Lead

Hello. I try to repeat it but not succeded. Can you share some simple project which does it ?

Br. J.T

PS. BTW you dont have to write those screen changes manually, it is enough if you add interactions even without any trigger to some of your screen.

JTP1_0-1688918844249.png

Tgfx will then generate those functions to frontend- base class (FrontendApplicationBase.cpp )and they can be called from any screen like:

application().gotoScreen2ScreenSlideTransitionEast();

Or from model-class for example like:

static_cast<FrontendApplication*>(Application::getInstance())->gotoScreen2ScreenSlideTransitionEast();

(add '#include <gui/common/FrontendApplication.hpp>' to model.cpp)