Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-17019] Ti.UI.Window: getBackgroundColor method returns undefined when no backgroundColor is set for window

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionInvalid
Resolution Date2014-05-22T13:32:04.000+0000
Affected Version/sRelease 3.3.0
Fix Version/sn/a
ComponentsTiAPI
Labelsqe-3.3.0
ReporterPriya Agarwal
AssigneeIngo Muschenetz
Created2014-05-22T09:09:03.000+0000
Updated2017-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

Comments

  1. Chris Barber 2014-05-22

    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.
  2. Lee Morris 2017-03-20

    Closing ticket as invalid.

JSON Source