cancel
Showing results for 
Search instead for 
Did you mean: 

TouchGFX 4.23.0 Designer sometimes skips interactions of custom containers

EmbDev
Senior

Hi,

 

Working with the latest version (4.23.0) for some time now. Luckily for now I have the generated code tracked in git.

When generating the code using TouchGFX Designer, I notice that sometimes some interactions of my custom containers are not generated. For now it is always related to the triggers of the Custom container that are used on my views (that use the custom container). The callback method (for the trigger) on the view is missing (in the ...ViewBase.cpp file):

 

finished.setButtonClickedCallback(buttonClickedCallback);

 

 Often only after I open the related view in the designer and then regenerate the code, this missing callback method is added to the generated code. Does anyone else have the same issue?

First it was only for one specific callback, but today I see three missing callbacks..
Very interested to the cause of this issue, so I can choose how to work around it until the next release

- Project too big for the generator?
- Too many interactions on a single view?
- Custom container issue?
- ...?

1 ACCEPTED SOLUTION

Accepted Solutions

Since I cannot share the application, it took some time. But now I managed to create a small example (see attachment).
While creating the example I also found the bug.

There are two custom containers in the project.

  • CustomContainer1 contains one item called finished.
  • CustomContainer2 contains one item (name irrelevant).

Both containers are added to the same view.

  • CustomContainer2 with name finished (!)
  • CustomContainer1 (name irrelevant, but contains an item called finished).

For CustomContainer2 I create an interaction (clicked callback).

When I open the project (screen1 is selected) and click generate -> No callback generated.
When I select the Screen1_1 view in the designer and generate -> Callback generated.

 

The cause must be the duplicate name finished, but there is no warning or error or anything.

View solution in original post

11 REPLIES 11

Hello @EmbDev ,

Sorry about the inconvenience. To be honest, we haven't received any other similar report, and I tried to replicate the problem but I couldn't see it. 
Is it possible for you to share us your project? Or can you use the latest version of the TouchGFX (4.23.1) and see if the issue still exist? 

Thank you so much

Mohammad MORADI
ST Software Developer | TouchGFX

It is very consistent for one specific click callback.
It somehow does make a difference whether the view is selected in the designer or not..
Which seems quite strange as the generator is an external script, right?

Updated to 4.23.1, but this didn't solve the issue, also ran the generator with the verbose flag.
Is there anything else I can do to get more information about this issue?

Hello again @EmbDev ,

Could you please share your project with me privately if you cannot share it here? 

The behavior you're describing is extremely strange, and I cannot figure out what the cause of the problem is without thoroughly investigate it.

Thank you 

Mohammad MORADI
ST Software Developer | TouchGFX

Since I cannot share the application, it took some time. But now I managed to create a small example (see attachment).
While creating the example I also found the bug.

There are two custom containers in the project.

  • CustomContainer1 contains one item called finished.
  • CustomContainer2 contains one item (name irrelevant).

Both containers are added to the same view.

  • CustomContainer2 with name finished (!)
  • CustomContainer1 (name irrelevant, but contains an item called finished).

For CustomContainer2 I create an interaction (clicked callback).

When I open the project (screen1 is selected) and click generate -> No callback generated.
When I select the Screen1_1 view in the designer and generate -> Callback generated.

 

The cause must be the duplicate name finished, but there is no warning or error or anything.

Hello @EmbDev ,

Thank you for providing the example. But, I'm afraid to say despite multiple attempts while using different versions of TouchGFX, and carefully following your instructions, I couldn't replicate the issue. All the required callbacks and functions were generated correctly.

Callbacks generated correctlyCallbacks generated correctly

The point you made about CustomContainer2 and an element in CustomContainer1 having the same names causing this issue can't be true because they are different objects, and there should be a distinction between them. Additionally, the code generation in TouchGFX is independent of the Screen you are viewing in the TouchGFX Designer. That's why I'm quite confused about your statement that selecting a different screen in the Designer results in different generated code.

I would like to see if other users can run the example and test if it happens for them or not.

Mohammad MORADI
ST Software Developer | TouchGFX

Thanks for checking, I completely agree with you that those should be separate objects and there should be no link with the designer. However, somehow there seems to be..

Could you check one more time, as I wasn't clear enough about 'No Callback generated'.
What I actually meant is in the Screen1_1ViewBase.cpp the line to register a callback is missing in the constructor.

Opened the project in the designer and clicked generate code:

EmbDev_0-1713274609502.png

Selected Screen1_1 in the designer and clicked generate code:

EmbDev_1-1713274665259.png

After selecting the Screen1_1 you have to re-open the project in the designer to reproduce the bug again.
It fails to generate the register callback until you select the Screen1_1 view.

Oh wow, now I see the issue :o 

I'm very sorry that I didn't realize it earlier, it was extremely subtle. Thank you so much again for reporting it and providing the example and the extra information.

I will dig in to it, and update you with the finding

Best regards, 

Mohammad MORADI
ST Software Developer | TouchGFX
EmbDev
Senior

Looking at the changelog of 4.24.0 I do not see this issue listed. Any idea when a fix will be released?

Hello @EmbDev ,

Oh, I can see that, unfortunately, the fix is not mentioned in the changelog, but the issue is fixed now in TouchGFX 4.24.0

The root cause of the problem was using same names for custom container instances in different screens as you pointed out earlier. 

Please, use TouchGFX 4.24.0 now and ensure that the problem no longer exists.

 

Best regards, 

 

Mohammad MORADI
ST Software Developer | TouchGFX