[TIMOB-17019] Ti.UI.Window: getBackgroundColor method returns undefined when no backgroundColor is set for window
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2014-05-22T13:32:04.000+0000 |
Affected Version/s | Release 3.3.0 |
Fix Version/s | n/a |
Components | TiAPI |
Labels | qe-3.3.0 |
Reporter | Priya Agarwal |
Assignee | Ingo Muschenetz |
Created | 2014-05-22T09:09:03.000+0000 |
Updated | 2017-03-20T20:44:20.000+0000 |
Description
getBackgroundColor method returns undefined when no backgroundColor is set for window.
Steps to reproduce:
1. Copy the code and run the app.
Expected Result:
Must return Background Color as transparent
Actual Result:
[INFO] Background Color is undefined
var win = Titanium.UI.createWindow({
title:"test color"
});
Ti.API.info("Background Color is "+ win.getBackgroundColor());
win.open();
This is not a regression
Every property returns undefined if it hasn't been set. I don't love it. I've argued that we should have sensible defaults, however as the iOS docs state, the initial value of many properties is nil and thus does not have a default value so Titanium just returns undefined.
Closing ticket as invalid.