2024-01-15 12:49 AM
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?
- ...?
Solved! Go to Solution.
2024-04-10 04:37 AM
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.
Both containers are added to the same view.
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.
2024-01-25 06:34 AM
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
2024-03-03 11:57 PM
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?
2024-03-22 03:44 AM
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
2024-04-10 04:37 AM
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.
Both containers are added to the same view.
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.
2024-04-16 06:14 AM
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.
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.
2024-04-16 06:41 AM - edited 2024-04-16 06:52 AM
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:
Selected Screen1_1 in the designer and clicked generate code:
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.
2024-04-17 07:09 AM
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,
2024-06-05 11:57 PM
Looking at the changelog of 4.24.0 I do not see this issue listed. Any idea when a fix will be released?
2024-06-06 06:07 AM
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,