On B2 Yes/No should still work fine - they just display yes/no and not the checkbox.
The code snippet below works fine on the old menu system, but does not seem to work on the new.
When you go into settings and change a No to a Yes, come out of settings and go back in, it says No again ?
In the run App (which works fine in the new Menu system) the code looks like:
if (WIDGETS["recorder"])
menu[/*LANG*/"Record Run"] = {
value : !!settings.record,
format : v => v?/*LANG*/"Yes":/*LANG*/"No",
onchange : v => {
settings.record = v;
saveSettings();
}
};
The significant difference would appear to be value : !!settings.record. Not sure why !! is needed ?
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
The code snippet below works fine on the old menu system, but does not seem to work on the new.
When you go into settings and change a No to a Yes, come out of settings and go back in, it says No again ?
In the run App (which works fine in the new Menu system) the code looks like:
The significant difference would appear to be
value : !!settings.record
. Not sure why !! is needed ?