Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

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'

    function(e) {

var table1 = Ti.UI.createTableView({
    data: [row1],

— asked August 2nd 2010 by lan sheng
  • 1.4.1
  • 4.0
  • sdk
  • My app also crashes but I didnt add an addEventListener call yet. I am only trying to add a switch control to a table view row. Same as the OP.

    — commented August 15th 2010 by Ben Hornedo
  • Same issue here but only on Android. I'm add a switch control to a tableViewRow (without an EventListener) and crashhh.
    On iPhone works fine.
    Is there a workaround for that?

    — commented October 5th 2010 by Gilliard Lopes
  • Same with me …

    — commented October 16th 2010 by Gerry Weißbach

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

    — answered June 30th 2011 by Christian Kleinschroth
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.