2020-08-31 01:14 AM
Hi Everybody.
I Have created many screens, they have same information, which will display in each screen like Date, Time (1st, 2nd...31st) and weekDay (Monday...Sunday).
i already display them in each screen by create every array in each screen, but it is inconvenience.
There are any ways, that can create only on array can store those data above (Date, time, weekday), and i can used them fore difference screen?
I tried to make a extern declare in every screen, but it is not correct.
Thanks and Best Regards.
2020-09-02 05:08 AM
Hi,
did you find a solution for this? I am not sure if I understand properly what you did. Did you successfully transfer data from a screen to another? If no, have a look at tutorial 3, it explains how to share data between two screens. If yes, then there are no easier way to send and receive data (to my knowledge).
In touchgfx, only one View/Presenter pair is active at any point in time, so you cannot pass data from screen to screen directly but you can technically have only one array in the model class where you share what is needed for a specific screen.
You always have to follow the same steps:
View1 -> Presenter -> Model -> Presenter -> View2.
2020-09-02 09:34 AM
Hi Romain Dieleman.
Thanks for your answer.
Yes i had successfully transfer data from a screen to another like tutorial 3.
But in my case i no need transfer data between screen.
i have 10 screens, in every screen i need to display Date, Time (1st, 2nd...31st) and weekDay (Monday...Sunday). These data i must declare in screenview.hpp in 10 screen , that mean i must using, array const char* Date[31], array const char* Weekday[8], and when screen setup i must init them Date[0]="1st", Date[1]="2nd".....Date[30]="31st" for screen 1, screen 2...screen 10, it will consume much memory. So every thing i need is only declare these array only times, and can using at 10 screen, because the data in these array is fixed and not change.