Skip to main content
JPabl.1
Associate III
October 17, 2024
Solved

how to separate functions from view for readability

  • October 17, 2024
  • 1 reply
  • 674 views

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!

Best answer by LouisB

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,

1 reply

LouisBBest answer
ST Employee
October 18, 2024

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,