BRT Community

General Category => Discussion - EVE => Topic started by: ndsmith34 on April 08, 2021, 08:56:07 PM

Title: ESD - Storing toggle value in Scroll Switch Page
Post by: ndsmith34 on April 08, 2021, 08:56:07 PM
I am adding a toggle to turn on dark mode for a set of screens in a Scroll Switch Page layout. I can get things to work as intended, but then if the pages loop around by swiping to the side several times, the toggle resets and turns off dark mode. I have tried using a variable, but I can never get it to both activate the dark mode and not reset. I'm trying to do all this in EVE Screen Designer. What method should I use to store the value of the toggle switch outside its page so it doesn't reset when the page gets reloaded?
Title: Re: ESD - Storing toggle value in Scroll Switch Page
Post by: BRT Community on April 12, 2021, 01:54:56 PM
Hello,

Thank you for your question.

Can you just clarify if you are using an ESD global variable or a global variable within your MCU to store the dark mode state of the page?

Best Regards,
BRT Community
Title: Re: ESD - Storing toggle value in Scroll Switch Page
Post by: ndsmith34 on April 12, 2021, 05:52:41 PM
I don't know if it's a global variable or not. I'm using the block from Logic Interface > Variable.
Also, I'm using ESD 4.8.
Title: Re: ESD - Storing toggle value in Scroll Switch Page
Post by: BRT Community on April 13, 2021, 12:06:17 PM
Hello,

Thank you for the clarification, in this case the variable will be part of page structure, if page structure is freed, the variable will be reset.

Generally we would advise using a MCU variable to store the value of any toggle witches you wish to remain persistent across several pages.

Best Regards,
BRT Community