You are reading a single comment by @HughB and its replies. Click here to read the full conversation.
  • 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 ?

        'Idle Warning': {
          value: s.idle_check,
          format: () => (s.idle_check ? 'Yes' : 'No'),
          onchange: () => {
            s.idle_check = !s.idle_check;
            save();
          },
        }
    

    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 ?

About

Avatar for HughB @HughB started