Project: titanium
Issue TIMOB-14285: Android: applyProperties() does not apply custom properties to proxy
h2. problem When using {{applyProperties()}} to add a number of properties to a Titanium proxy object, custom properties are not added on Android. On iOS and Mobileweb all properties, including custom ones, are added with the {{applyProperties()}} call. Android leaves the custom properties as {{undefined}}. h2. expected Android should behave like other supported platforms and attach custom properties to the Titanium proxy object when they are added via {{applyProperties()}}. h2. test case {code:javascript} var win = Ti.UI.createWindow({	backgroundColor: '#fff',	fullscreen: false,	exitOnClose: true }); win.open(); win.applyProperties({	customString: 'Ti.UI.Window',	customArray: ['class1','class2','class3'],	customObject: {	x: 1,	y: 2,	z: 3	},	navBarHidden: true,	backgroundGradient: { type: 'linear', startPoint: { x: '0%', y: '50%' }, endPoint: { x: '100%', y: '50%' }, colors: [	{ color: 'red', offset: 0.0},	{ color: 'blue', offset: 0.25 },	{ color: 'red', offset: 1.0 } ], } }); Ti.API.info('customString: ' + JSON.stringify(win.customString)); Ti.API.info('customArray: ' + JSON.stringify(win.customArray)); Ti.API.info('customObject: ' + JSON.stringify(win.customObject)); Ti.API.info('navBarHidden: ' + JSON.stringify(win.navBarHidden)); Ti.API.info('backgroundGradient: ' + JSON.stringify(win.backgroundGradient)); {code} h2. output iOS does not show the {{backgroundGradient}} after the {{applyProperties()}} call, but this is a peripheral issue not associated with this ticket. h4. iOS 6.1 iPhone sim {code} [INFO] customString: "Ti.UI.Window" [INFO] customArray: ["class1","class2","class3"] [INFO] customObject: {"x":1,"y":2,"z":3} [INFO] navBarHidden: true [INFO] backgroundGradient: {} {code} h4. Android 2.3.3 HVGA emulator {code} I/TiAPI ( 517): customString: undefined I/TiAPI ( 517): customArray: undefined I/TiAPI ( 517): customObject: undefined I/TiAPI ( 517): navBarHidden: true I/TiAPI ( 517): backgroundGradient: {"endPoint":{"y":"50%","x":"100%"},"type":"linear","colors":[{"offset":0,"color":"red"},{"offset":0.25,"color":"blue"},{"offset":1,"color":"red"}],"startPoint":{"y":"50%","x":"0%"}} {code} h4. mobileweb + chrome {code} [INFO] customString: "Ti.UI.Window" [INFO] customArray: ["class1","class2","class3"] [INFO] customObject: {"x":1,"y":2,"z":3} [INFO] navBarHidden: true [INFO] backgroundGradient: {"type":"linear","startPoint":{"x":"0%","y":"50%"},"endPoint":{"x":"100%","y":"50%"},"colors":[{"color":"red","offset":0},{"color":"blue","offset":0.25},{"color":"red","offset":1}]} {code}
Story points: 8