[TIMOB-23987] iOS: Ti.UI.Switch should default to false but is undefined
GitHub Issue | n/a |
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2016-10-05T19:18:16.000+0000 |
Affected Version/s | Release 6.0.0 |
Fix Version/s | n/a |
Components | iOS |
Labels | qe-6.0.0 |
Reporter | Josh Longton |
Assignee | Hans Knöchel |
Created | 2016-10-05T17:53:25.000+0000 |
Updated | 2017-03-16T20:33:05.000+0000 |
Description
Steps to reproduce:
Create a new classic project appc new
Replace the app.js with the one below.
app.js
{noformat}
var win = Ti.UI.createWindow({
backgroundColor: 'white'
});
var basicSwitch = Ti.UI.createSwitch();
win.add(basicSwitch);
basicSwitch.addEventListener('change',function(e){
Ti.API.info('Switch value: ' + basicSwitch.value);
});
win.open();
Ti.API.info('Switch value: ' + basicSwitch.value);
{noformat}
Actual
{noformat}
[INFO] : Switch value: undefined
{noformat}
Expected
The default value should be false
{noformat}
[INFO] : Switch value: False
{noformat}
Comments
JSON Source
Duplicate of TIMOB-9007, already fixed.
Closing ticket as duplicate.