Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24894] Windows: Ti.App.Properties.get* should all be able to return null

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2017-08-15T00:56:43.000+0000
Affected Version/sRelease 6.1.0, Release 6.1.1, Release 6.2.0
Fix Version/sRelease 6.2.0
ComponentsWindows
Labelsn/a
ReporterEwan Harris
AssigneeKota Iguchi
Created2017-06-26T15:20:38.000+0000
Updated2017-08-16T17:03:09.000+0000

Description

Description

Following on from TIMOB-24838, all Ti.App.Properties.get* functions should be able to return null,
console.log(JSON.stringify(Ti.App.Properties.getList('UserList', null)));
console.log(JSON.stringify(Ti.App.Properties.getObject('UserObj', null)));
console.log(JSON.stringify(Ti.App.Properties.getString('UserObj', null)));
console.log(JSON.stringify(Ti.App.Properties.getBool('UserObj', null)));
console.log(JSON.stringify(Ti.App.Properties.getInt('UserObj', null)));
console.log(JSON.stringify(Ti.App.Properties.getDouble('UserObj', null)));
[INFO]  null
[INFO]  null
[INFO]  null
[INFO]  null
[INFO]  null
[INFO]  null
[INFO]  null
[INFO]  null
[INFO]  null
[INFO]  false
[INFO]  0
[INFO]  0

Steps to reproduce

Add the above code to an existing app.js and build for Windows

Actual

Output is as shown under the Windows header above

Expected

Output should match Android and iOS

Comments

  1. Kota Iguchi 2017-08-04

    https://github.com/appcelerator/titanium_mobile_windows/pull/1061
  2. Samir Mohammed 2017-08-11

    [~kiguchi] Master is merged. Waiting for 6_2_X.
  3. Kota Iguchi 2017-08-15

    Merged to 6_2_X. https://github.com/appcelerator/titanium_mobile_windows/pull/1074
  4. Samir Mohammed 2017-08-16

    Verified fix in SDK Version 7.0.0.v20170815065413 and SDK Version: 6.2.0.v20170815130745 Test and other information can be found at: Master: https://github.com/appcelerator/titanium_mobile_windows/pull/1061 6_2_X: https://github.com/appcelerator/titanium_mobile_windows/pull/1074

JSON Source