switch control add change event crash the app in 1.4.1.
I updated the sdk from 1.4 to 1.4.1 for the xhr problem, but I still get other crash in my app, I debug my app, found when add a switch control to a TableViewRow, then add a change event listener to switch control, the app will crash, no error report, the following is test code, the code run ok in 1.3 and1.4 sdk , crash in 1.4.1. ios is 4.0.
var sw = Ti.UI.createSwitch({
right: 10,
value: false,
top: 5
});
var row1 = Ti.UI.createTableViewRow({
height: 38,
backgroundColor: 'white'
});
row1.add(sw);
sw.addEventListener('change',
function(e) {
});
var table1 = Ti.UI.createTableView({
data: [row1],
});
win1.add(table1);
1 Answer
-
same issue - it doenst crash in emulator but on device (sdk version 1.7.1 on iphone 3g and android 2.2 - lg optimus speed)
I create a TableView Row with one Label and one Switch. If i doenst add the Label, the TableView shown but if you like to scroll, the app crash on the apple device, on android device it crashes before.
Both works fine in emulator