Hello, I’m finding that if I put an object such as a number on a page and then set it to a value in the pre or postinitialization page event, then edit the value with a keyboard, the original value remains. It’s like the page is refreshed entirely again and the value from the keyboard is overwritten by the pre or post event. How can I populate some fields and then change them with a keyboard? Thanks.
What is the code in the pre and postinitialization events and in the keyboard input?
Just
n0.val=123
I think when the keyboard is closed, the underlying page is completely refreshed and the pre and postinitialization gets called again. It works fine if the values aren’t set already by the page loading.
You probably need to store the value in a variable. If you have a default value when the program starts you don’t need to use the EEPROM. If you need to use the last value entered when restarted, then use the EEPROM. The preinitialize code sets the n0 value from the variable. The keyboard sets both the variable and n0. Store the variable value in EEPROM when you exit the page (or program).