I have problems with this snippet of code:
switch (SettingsHandler.getSetting("language")) {
case "de":
languageSwitch.setState(1); // de
case "en":
languageSwitch.setState(0); // en
}
As you can see, if the method getSetting() returns “de”, the object languageHandler’s setState() method get’s called and set to 0. But this doesn’t seem to work.
I printed the result of getSettings(“language”) and it is “de”. After the switch statement, I use getState() on languageSwitch and it returns 0 even though I just set it to 1!
Yes, this mostly are custom objects with custom methods but they seem to work alright. But if you need them, let me know what exactly!