Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-5237

iOS: Not passing optional param to function causes crash

    Details

      Description

      There's an inconsistency between in-browser JS and Titanium where not passing a parameter to a function, then referencing that parameter, causes a red screen.

      // TITANIUM
      function getList(name, value) {
          return Titanium.App.Properties.getList(name, value);
      }
       
      var a = getList("key", "value"); // Works
      var b = getList("key"); // Dies: "Attempt to insert nil object"
       
      // BROWSER
      function getList(name, value) {
          return whatever(name, value);
      }
       
      function whatever(name, value) { // Pretending to be Ti.App.Properties.getList()
          return true;
      }
       
      var a = getList("key", "value"); // Works
      var b = getList("key"); // Works
      

        Attachments

          Activity

            People

            • Assignee:
              srahim Sabil Rahim
              Reporter:
              matthewcongrove Matthew Congrove
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-4433
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Integration