You are reading a single comment by @RaoulDuke and its replies. Click here to read the full conversation.
  • I had some problem creating a settings menu for my clock. I wanted to preview different clock faces, for which i would need some functions from the clock app. Apparently, it is impossible to import functions into the settings app. My workaround was to just write a very basic settings.js:

    (function(back) {
      var settings = require('Storage').readJSON("contourclock.json", true) || {};
      settings.editMode=true;
      require('Storage').writeJSON("contourclock.json", settings);
      load('contourclock.app.js');
    })
    

    The clock app just has to check for "settings.editMode", disable UI and enter its own settings mode.
    Are there any problems with this approach?

About

Avatar for RaoulDuke @RaoulDuke started