Bugs because javascript fails!
Andy was using the MobileVikings gadget and noticed yet another problem…
First he noticed that the number in the settings box wasn’t saved.
When these kinds of things happen, a programmer needs to know that it has something to do with classes mixing up…
My knowledge of javascript is rather limited, so I took a look on the internet.
Appearantly javascript is using absolutely no classes… Every variable is stored into a “var”. No matter if this is a string, an int, a byte, … So that was causing this issue…
Numbers “0475” ended up as “475” because useless, leading zeroes are disposed…
Ofcourse…
So this needs to be changed!
Luckily Microsoft know about this problem, and provided a method called readString and writeString into their Sidebar API.
So after changing some code to these “string-aware” methods, this issue should be gone now 🙂
Stupid javascript…