Details

      Description

      {html}<div><pre>
      <code class="javascript">var win = Ti.UI.createWindow({
      top: 0, left: 0, right: 0, bottom: 0,
      backgroundColor: 'black'
      });

      var data = [];
      var row = Ti.UI.createTableViewRow({title: "Test Row", hasChild: true});
      data.push(row);

      var tbl = Ti.UI.createTableView({
      data: data,
      top: 100, left: 0
      });
      win.add(tbl);

      var menu = Ti.UI.Android.OptionMenu.createMenu();
      var editBtn = Ti.UI.createButton({
      title: 'Edit',
      top: 0, left: 0
      });

      editBtn.addEventListener('click', function() {
      for (var i in tbl.data) {
      for (var j=0 ; j < tbl.data[i].rowCount ; j++) {
      var row = tbl.data[i].rowAtIndex(j);
      if (!row.cb) {
      row.cb = Ti.UI.createSwitch({ visible: !row.hasChild, style: Ti.UI.Android.SWITCH_STYLE_CHECKBOX, right: -5, // Negate the built-in pad });
      row.add(row.cb);
      }

      row.hasChild = !row.hasChild;
      row.cb.visible = !row.cb.visible;
      }
      }
      tbl.data = tbl.data;
      });
      win.add(editBtn);
      win.open();</code>
      </pre>
      <p>Click the menu button once, everything toggles as expected.
      Click it a second time, crash.</p>
      <p>W/KrollConverter( 3298): (kroll$3) [3470,11710] Unhandled type
      conversion: value: [object TiUITableViewSection] type:
      ti.modules.titanium.ui.TableViewSectionProxy, invocation:
      [setProperty UI.TableView.data
      ti.modules.titanium.ui.TableViewProxyBindingGen$2@48360280]<br>
      F/dalvikvm( 3298): Exception!!! threadid=1: thread exiting with
      uncaught exception (group=0x4001d940)</p></div>{html}

        Attachments

          Activity

            People

            • Assignee:
              dthorp Don Thorp
              Reporter:
              nathanielmccallum Nathaniel McCallum
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-2057
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Integration