Skip to main content
LBend.1
Associate III
March 15, 2021
Solved

How to pass set information from one screen to another?

  • March 15, 2021
  • 1 reply
  • 1678 views

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.

This topic has been closed for replies.
Best answer by Alexandre RENOUX

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

1 reply

Alexandre RENOUX
Alexandre RENOUXBest answer
Visitor II
March 16, 2021

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

LBend.1
LBend.1Author
Associate III
March 16, 2021

Alexandre,

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

Thanks!