cancel
Showing results for 
Search instead for 
Did you mean: 

How to pass set information from one screen to another?

LBend.1
Associate III

I'm working on a project that requires setup for various controls. I've built a main screen (MainMenu) which transitions into a sub screen (ZoneSetup) to move a few temp selection sliders, toggle some buttons, etc. for the setup. I need to pass that information back/retain that setup information so anytime the user returns the previously set information is present.

I followed the pool example project to pass the information via the model (only focusing on the top slider right now), but when I update the slider (zone1) and try to return the program crashes.

Also, another issue that I'm trying to solve is why one slide also affects/glitches the indicated text for a non-corresponding slider (ex: move zone2 resets/changes zone1).

Any thoughts on these errors or how I should be doing this?

See the attached .zip of the associated project.

1 ACCEPTED SOLUTION

Accepted Solutions
Alexandre RENOUX
Principal

Hello LBend.1,

I fixed your project. You will find enclosed the TouchGFX/ folder. Simply replace your current one with this one and it should work.

As for what was the problem, to put it simply your handling of TextArea was wrong.

You set your TextAreas to Autosize but if you modify the content you need to recall autosize. This not very efficient so I just changed to a fixed size that can encompass the biggest number. Also, your wildcard buffer was only 3 which was insufficient. I set it to 6 to be sure. But the biggest issue was the fact that you were trying to fill the Wildcard with 4 elements while you only set your wildcard buffer for 3 elements. It does not match.

After making this small change, no more glitches or crash.

When your question is answered, please close this topic by choosing Select as Best.

/Alexandre

View solution in original post

2 REPLIES 2
Alexandre RENOUX
Principal

Hello LBend.1,

I fixed your project. You will find enclosed the TouchGFX/ folder. Simply replace your current one with this one and it should work.

As for what was the problem, to put it simply your handling of TextArea was wrong.

You set your TextAreas to Autosize but if you modify the content you need to recall autosize. This not very efficient so I just changed to a fixed size that can encompass the biggest number. Also, your wildcard buffer was only 3 which was insufficient. I set it to 6 to be sure. But the biggest issue was the fact that you were trying to fill the Wildcard with 4 elements while you only set your wildcard buffer for 3 elements. It does not match.

After making this small change, no more glitches or crash.

When your question is answered, please close this topic by choosing Select as Best.

/Alexandre

Alexandre,

Thanks a ton! This is exactly right, I'll remember this corner case for the future!

Thanks!