TouchGFX kept in memory my previous settings for DigitalClock (removed widget) [solved]
Hello,
I created a test project (Riverdi_101STM32H7-4.20) on the side of my main project the other day about managing a clock between multiple screens via a container (see here : https://community.st.com/s/question/0D53W00001g13KBSAY/custom-container-on-multiple-screen-set-digitalclock-problem-solved )
I recently tried to replace my digitalClocks in my screens of my main project by a digitalClock in a container (banner). I copied exactly the same code as in my test project but it failed to work. Indeed, the behavior of the clock was really weird. It started back at 08:25:36 in the first screen (normal because it's the time I set), but then it was 00:00:00 in the second screen and 12:40:28 in the third one.
I tried everything, renaming mytickCounter, renaming the clockbanner widget, but nothing worked.
I printed on my screens the tickCounter/60 to see the problem.
- 1st screen: number of seconds/ticks goes well. It stops counting (pauses) when I change screens but comes back to the good number when I I get back to the 1st screen.
- 2d and 3d screen the tick goes back to 0 (it didn't go back to 0 in my test project).
Now, I saw that when I waited 3 seconds in my 1st screen and came back to my 3d, the digitalClock of the 3d screen had passed 3 hours and not 3 seconds. And there was some other weird behavior of time adding up when I changed screens.
Now ... I remember exactly setting in my DigitalClock of the 3d screen (so before I changed it for a banner/container) the time 12:40:28 in the Designer (and 00:00:00 in the 2d screen). But I deleted ALL the digitalClocks of my project in the designer to only leave the one in my banner (which is set to the typical 10:10:00 and not 12:40:28). They had the same name though.
My guess is that the designer or the project kept in memory the information for the previous digitalClocks and didn't erase everything when I deleted the widgets from my screens.
So I tested something out. I recreated from scratch my project, added the banner, copied the GUI entire file (so all my personal code) and now it works perfectly fine, like my test project.
- How to be sure that the designer or the project doesn't keep in memory the previous widgets even if they have the same name as the old deleted widgets please?
- I've already started from scratch and wouldn't want to do it again if it happened again in the future, could you see if there is a problem with TouchGFX or if I did something wrong, please?
- Do you know if there is a way to keep the screens and code of my project but removing all the temporary files (wouldn't want to start from scratch again ^^)
I cannot share my current (failing) project a it has personal info in it, that's why I created a test project in the beginning, to be able to share that one (shared in the link at the beginning of my question).
Thanks a lot in advance,
Eve
