2022-08-11 12:13 PM
I am new to TouchGFX and STM32 programming, so I apologize if any obvious details are missed.
I am attempting to run Tutorial 2 in the TouchGFX tutorial (Because I'm a new member, I cannot add the link, but it's the TouchGFX Version 4 19 tutorial guide, Tutorial 2)
I have successfully run up to "Step 4: Adding Code."
I completed up to the step where it asks you to create the "buttonDown" interaction on the TouchGFX Designer (I'm running on 4 19 1).
I generate the code without issue, then it asks me to open MainViewBase.hpp (I was trying several screens, so mine is called Screen4ViewBase.hpp).
When I add the recommended code to display the "buttonUpClicked" and "buttonDownClicked" text pop up, I hit the "Run Simulation" button on the TouchGFX Designer and the code that I wrote disappears, so the text obviously does not appear.
Am I doing something wrong?
Solved! Go to Solution.
2022-08-12 07:20 AM
No this files is modified by generator when you move or change object in designer.
You can place code here, but every generation remove it.
Normal place code into folder GUI
2022-08-11 09:59 PM
Base file is generated code, and every Simulate or Generate click overwrite all generated files.
All your user code need be placed into GUI files Screen4View.hpp or cpp and other.
2022-08-12 06:24 AM
Hello, thank you for the reply!
Just to make sure I understand, these are the files that I should modify, correct?
If so, these are the ones I tried and they are being overwritten.
2022-08-12 07:20 AM
No this files is modified by generator when you move or change object in designer.
You can place code here, but every generation remove it.
Normal place code into folder GUI
2022-08-12 08:59 AM
Just tried using the GUI folder and finding the same code. It solved the overwriting problem.
Thank you very much for the help!