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

iOS: Properties.setList - Ti.App.Properties.setList cannot save arrays that contain null, undefined, or empty values

    Details

      Description

      Details: If you use Ti.App.Properties.setList() to save an array that contains null, undefined, or an empty value, then setList() will not save the array and return "Attempt to insert non-property value" message in xcode's console.

      This is not a regression. Bug still occurs on 3.0.2.GA.

      Also, Ti.App.Properties.setList() works as expected on Android; can save an array that contains null, undefined, or an empty value.

      Steps to reproduce:
      1. Install the following Titanium app to an iOS device:

      var win = Ti.UI.createWindow({
      	backgroundColor: 'white'
      });
       
      // same issue if there is null or undefined in the array
      var vals = [,42];
      Ti.App.Properties.setList('number', vals);
       
      var label = Ti.UI.createLabel({
      	text: (Ti.App.Properties.getList('number')[1] + ' monkies'),
      	font: { fontSize:48 }
      });
       
      win.add(label);
      win.open();
      

      2. Launch app

      Actual: iOS will not save vals array and return "Attempt to insert non-property value" message (see log.txt)

      Expected: App should launch with "42 monkies" in the label like in Android (see android.png)

      Note: This issue seems similar to TIMOB-11399

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mstepanov Max Stepanov
                Reporter:
                wluu Wilson Luu (Inactive)
                Reviewer:
                Vishal Duggal (Inactive)
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Integration