Skip to main content
Senior III
September 25, 2025
Solved

radio button callback when selected is generated wrongly by TouchGFX 4.25

  • September 25, 2025
  • 2 replies
  • 373 views

So if you have a radio button with a callback function set via TouchGFX on click selected, the code generated in the BaseView has a typo in setAction

It uses the function SetAction (with capital S) which is wrong

TO REPLICATE:

  1. Create a radio button
  2. create a Interactions "radio button is selected" that calls a virtual function
  3. generate the code
  4. the code generated:
radioButton.SetAction(radioButtonSelectedCallback);

instead of

radioButton.setAction(radioButtonSelectedCallback);

On another note, no callback is called if the radio button is selected, even if seAction is manually fixed

 

Best answer by nico23

Hi @JohanAstrup 

I have opened and closed TouchGFX and deleted and re-added the radio button and now it worked correctly...

Maybe some sort of old cache from previous compilation or something. 

2 replies

ST Employee
September 25, 2025

Hello @nico23.

I have followed the steps you provided to reproduce the issue. However, I am unable to replicate it.
I have attached my test project, where setAction is correctly spelled, and the callback is received when running the simulator.

Are you sure you have not accidentally modified your RadioButtonGroup.hpp file in the framework folder? Alternatively, could the file in your TouchGFX installation folder, from which it is copied when you generate code, have been modified?

Best regards,
Johan

nico23AuthorBest answer
Senior III
September 25, 2025

Hi @JohanAstrup 

I have opened and closed TouchGFX and deleted and re-added the radio button and now it worked correctly...

Maybe some sort of old cache from previous compilation or something.