Details
-
Type:
Bug
-
Status: Closed
-
Priority:
High
-
Resolution: Fixed
-
Affects Version/s: Release 3.0.2, Release 3.1.0
-
Fix Version/s: Release 3.1.0, 2013 Sprint 07 Core, 2013 Sprint 07
-
Component/s: iOS
-
Environment:
SDK build: 3.0.2.GA, 3.1.0.v20130319163434
Titanium Studio, build: 3.1.0.201303182358
Device: iphone 4 (4.3.5) iphone 4s (5.1.1)
Xcode: 4.5.2
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
- relates to
-
TIMOB-11399 iOS: Ti.App.Properties.setObject cannot save object with null values in it
-
- Closed
-