TestLocalStorage.nsx (25.1 KB)
When the attached test program is run, line 47 (when activated) will print 4 'null’s… which is correct, since no localStorage was available at the start of execution.
If you run it again, without closing AppStudio, and click on one or more of the buttons, the buttons will alternate between white and green… which is correct…
Leave a couple of them green… Line 47 will continue to print out the contents of localStorage… e.g., if you leave buttons 0 and 2 green and 1 and 3 white, the print out will be g w g w in four lines… which is correct.
Run the program again, without quitting AppStudio, and the button will show green, white, green, white… this is correct.
Now quit AppStudio, reopen it, and run the program… all buttons will be white, even though the localStorage (based on line 47 printout) says they should be green, white, green, white. So what happened to localStorage as a result of closing and opening AppStudio?
PS: Running latest version of AppStudio, Windows 10, Chrome (not tested on iPad nor Android yet.)