Problem description
Application crashes when a Slider object is created specifying the 'value' property and it's placed inside a tableViewRow
Steps to reproduce
Run the sample code:
var win1 = Titanium.UI.createWindow({backgroundColor:'#FFFFFF'});
var ds =[];
expandableView = Ti.UI.createView({top:0,height:40,backgroundColor:'yellow'});
var slider = Titanium.UI.createSlider({
top: 0,
min: 0,
max: 100,
// width: '100%',
value:50
});
expandableView.add(slider);
var row1 = Titanium.UI.createTableViewRow({height:100});
row1.add(expandableView);
ds.push(row1);
//
var tableView = Titanium.UI.createTableView({
data : ds,
scrollable : true,
separatorColor : 'transparent',
separatorStyle: 'none',
top:0,
height:80
});
var button1 = Ti.UI.createButton({
title:'show slider value',
top: 250,
width:200,
height:80
});
button1.addEventListener('click', function(){
alert(slider.value)
});
win1.add(button1);
var button2 = Ti.UI.createButton({
title:'set slider value to 50',
height:80,
width:200,
bottom:5
});
button2.addEventListener('click', function(){
slider.value = 50
});
win1.add(button2);
win1.add(tableView);
win1.open();
Further notes:
Comment out the 'value' property and then set it manually (for example, clicking a button).
In this case, the value it's correctly stored and displayed.
Adding the slider directly to the Window works. Crash only occurs when slider it's added in a tableViewRow.
Attached the crash log file too.
Escalated as per customer request.
TIMOB-9895 is another report of this bug which is requesting this be back ported to 2.1.1.
Created [PR #2563](https://github.com/appcelerator/titanium_mobile/pull/2563) to back port fix into 2_1_X.
Environment used for verification - Tested with Titanium SDK: 2.1.1.v20120716180600 Tested with Titanium Studio: 2.1.1.201207161421 Device - Android Emulator 2.3.3 Machine OS - MAC 10.7.3