2020-02-28 02:34 AM
Hello,
I found this bug that caused a lot of problems until I found it out.
Adding action in Desginer will reset all button numbers to blank.
I wondered long time why buttons do not work anymore and why they keep resetting to blanks.
How to recreate:
EDIT: Problem appears also with objects. So instead of step 3, add object (line, container, image etc.) and hardware button mappings will be reset to 0.
2020-02-28 04:07 AM
Thanks for the report, Tuoman. Just to be clear, what's reset is if you've mapped the numbers to names through the .touchgfx file - The name disappears? If so, is it removed from the .touchgfx file?
/Martin
2020-02-28 05:39 AM
> if you've mapped the numbers to names through the .touchgfx file
I only use the TouchGFX designer, I have not modified the .touchgfx file manually.
Every "ButtonKey" parameter is changed to 0.
Here is my git diff when action has been added in Designer:
@@ -36,11 +36,11 @@
"Interactions": [
{
"InteractionName": "Interaction1",
"HasCompletedTrigger": false,
"Trigger": {
- "ButtonKey": 3,
+ "ButtonKey": 0,
"Type": "TriggerPhysicalButtonClicked"
},
"Action": {
"ScreenTransitionType": "ScreenTransitionNone",
"ActionComponent": "Home2",
@@ -49,11 +49,11 @@
},
{
"InteractionName": "Interaction2",
"HasCompletedTrigger": false,
"Trigger": {
- "ButtonKey": 25,
+ "ButtonKey": 0,
"Type": "TriggerPhysicalButtonClicked"
},
"Action": {
Thanks for fix, in advance =)
2020-03-02 06:18 AM
Something to try: "Generate Code" prior adding interactions.
It might have something to do with how the generated/gui_generated files are created.
Not sure if this is related or not, but awhile back I saw strange behavior when copy/pasting shapes on the screen resulted in points being altered:
2020-03-04 02:21 AM
>Something to try: "Generate Code" prior adding interactions.
This is impossible to solve problem, because problem is not when interactions are added. Nor the problem has to do with code, it has to do with TouchGFX generating .touchgfx configuration file.
Problem occurs if you click (+) button in actions -> immediately all hardware buttons are reset to 0. Generate code button does not save it.
But I noticed that again my hardware buttons were reset to 0, even though I didnt add actions. There might be more causes that reset hardware buttons than adding actions...
2020-03-09 04:26 AM
>But I noticed that again my hardware buttons were reset to 0, even though I didnt add actions. There might be more causes that reset hardware buttons than adding actions...
I found more causes for this problem.
If you add any object to the view, it will reset all hardware buttons to 0 for that view! Very annoying! Adding image, line, button or custom container etc. will reset all hardware buttons to 0.