cancel
Showing results for 
Search instead for 
Did you mean: 

how to separate functions from view for readability

JPabl.1
Senior

Hi there Touchgfx team!

 

I have a screen that does a lot different process based on buttons. I find myself scrolling up/down a lot so it feels its time to move functions into another file for simplicity. 

I want to offload helperfunctions that are in the calibrateView.cpp. Should I create a normal .cpp file or do I need to create a "helper" class? 

My purpose is just to help with readability and maintainability. 

JPabl1_0-1729205273668.png

Thanks a lot in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
LouisB
ST Employee

Hello @JPabl.1,

What you can do is create a helper cpp file in the common folder and import that file when you need it. Also you can add your helpers to the FrontendApplication file, if you don't want to create a new file.

BR,

Louis BOUDO
ST Software Developer | TouchGFX

View solution in original post

1 REPLY 1
LouisB
ST Employee

Hello @JPabl.1,

What you can do is create a helper cpp file in the common folder and import that file when you need it. Also you can add your helpers to the FrontendApplication file, if you don't want to create a new file.

BR,

Louis BOUDO
ST Software Developer | TouchGFX