Dependancy type "widget" not supprted

Posted on
  • Can't get dependancies to work with widgets.

    {
        "id": "rebble",
        "name": "Rebble Clock",
        "shortName": "Rebble",
        "version": "0.02",
        "description": "A Pebble style clock, with configurable background, three sidebars including steps, day, date, sunrise, sunset, long live the rebellion",
        "readme": "README.md",
        "icon": "rebble.png",
        "dependencies": {"mylocation":"app"},
        "dependencies": {"widpedom":"widget"},
        "screenshots": [{"url":"screenshot_rebble.png"}],
        "type": "clock",
        "tags": "clock",
        "supports": ["BANGLEJS2"],
        "storage": [
          {"name":"rebble.app.js","url":"rebble.app.js"},
          {"name":"rebble.settings.js","url":"rebble.settings.js"},
          {"name":"rebble.img","url":"rebble.icon.js","evaluate":true}
        ]
      },
    

    I also tried

        "dependencies": [{"mylocation":"app"},{"widpedom":"widget"}],
    

    But this resulted in an Object Object error.


    1 Attachment

    • Screenshot 2021-12-13 19.11.33.png
  • You can't have duplicate keys in JSON so that could cause an issue. Looks like maybe the app loader needs updating to allow you to have more than one dependency?

    Also, when it is allowed, you probably just want {"widpedom":"app"} - although it is a widget, the app loader may not care - 'app' will just mean it's looking for something with that app ID.

  • Yes, definitely need more than 1 dependancy. Do you need me to log it as an issue on github? I'm not desperate for a fix, but want to manage dependancies properly in my apps in future to avoid support issues and frustration of new users.

  • Just checked, this it works fine. I just added it for you for pastel: https://github.com/espruino/BangleApps/commit/5bcf66d6faa01b494511acb986ee1f34346b4c3d

    You literally just do:

    "dependencies": {"mylocation":"app", "widpedom":"app"},
    
  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Dependancy type "widget" not supprted

Posted by Avatar for HughB @HughB

Actions