Skip to main content
heyo
Associate III
Jan 25, 2023 9:11 AM UTC
Question

Adding elements to list

I'm faced with problem when I add elements to list. For better understanding I explain what I want to do. So here when I click add new elements I go to other screen where config pinout. And when I click save it stores names like "VM1", "Main module" in array there is placed in model.hpp. In list layout I can create 5 elements.0693W00000Y96nNQAR.pngWhen I add more than 3 elements to the list my names somehow which I store in array disappear and random values which is in my project enrolls

0693W00000Y96qRQAR.pngWhat can cause this problem?

This topic has been closed for replies.

8 replies

Yoann KLEIN
ST Employee
Jan 25, 2023 11:01 AM UTC

Hello @heyo​,

That looks like an out-of-bound issue.

How did you create and initialize your array ?

/Yoann

Yoann KLEINST Software Developer | TouchGFX
heyo
heyoAuthor
Associate III
Jan 25, 2023 11:42 AM UTC

I create structure in model.hpp

0693W00000Y97haQAB.pngThis is how put information in to arrays

0693W00000Y97hfQAB.png

Yoann KLEIN
ST Employee
Jan 25, 2023 12:16 PM UTC

Can you also show me how you display your Array values into the screen ?

Also, why are you using 2-dimensionnal arrays for Headlines and Correction ?

/Yoann

Yoann KLEINST Software Developer | TouchGFX