cancel
Showing results for 
Search instead for 
Did you mean: 

Sync data between screens

jeff belz
Associate II

I have 2 screens. The first screen has a button and a text area. The second has a scroll wheel and a button.

What I want:

1) Click on button on screen 1, and go to screen 2 (got this working)

2) Scroll to a number on the scroll wheel on screen 2, hit the button on screen 2, goes back to screen 1 (This also works)

3) The text area on screen 1 should match the scroll wheel number on screen 2 (can't figure this out)

4) When I return to screen 2, scroll wheel should remain on previous selection (does not work)

Simple in concept, but can't figure out how to do this. Any examples out there on how to do this. ? I'm using wildcards for my text areas. the big issue is passing data to screen 1 and also saving data from screen 2.

Any help would be appreciated

1 ACCEPTED SOLUTION

Accepted Solutions
ktrofimo
Senior III

TouchGFX is based on MVP (Model-View-Presenter) architecture. Common data supposed to be stored in a Model class with corresponding methods to set and get their values. Look for examples at https://support.touchgfx.com/docs/development/ui-development/software-architecture/model-view-presenter-design-pattern​

View solution in original post

3 REPLIES 3
ktrofimo
Senior III

TouchGFX is based on MVP (Model-View-Presenter) architecture. Common data supposed to be stored in a Model class with corresponding methods to set and get their values. Look for examples at https://support.touchgfx.com/docs/development/ui-development/software-architecture/model-view-presenter-design-pattern​

jeff belz
Associate II

Thanks for the lead. Looks like Tutorial 3 take you through saving data with the model class

Exactly​