cancel
Showing results for 
Search instead for 
Did you mean: 

How to save wildcard value when switching between multiple screens?

purushotham2608
Associate III

Hello all, Good day, Recently I have been messing around with Text Areas and Wildcards in TouchGFX. I have found that the wildcards value will not save when switching between multiple screens. by using keyboard, I am using the keyboard keys to enter into the text area but when we switch to another screen the entered text in the text area is deleted and it shows blank in the text area. How to solve this problem?

2 REPLIES 2
t.decker
Senior II

You have to save the data in your model (or elsewhere) before leaving the screen and load it back to the screen when entering it.

Read the TouchGFX documentation, maybe this is a good starting point for your current problem: https://support.touchgfx.com/docs/development/ui-development/software-architecture/model-view-presenter-design-pattern

When this account seems to be inactive, try @tdecker2 - ST can't change mail addresses, so I had to create a new account.
GaetanGodart
ST Employee

Hello @purushotham2608 ,

 

As @purushotham2608 mentioned, this is done by passing the value through the model view presenter design pattern (MVP).

You can find the development guide for the MVP here : MVP explanation 
You can also find a tutorial on creating a project with multiple screens sharing variables here : Tutorial 3 Applications with Multiple Screens 

Hope this helps.

Don’t hesitate to give us a feedback or give more precisions and mark an answer as solution if the issue is solved! :smiling_face_with_smiling_eyes:

Gaetan Godart
Software engineer at ST (TouchGFX)