Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-24818

Windows: Calling insertRow with a deleted row errors out application

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: Release 6.1.0
    • Fix Version/s: Release 7.1.0
    • Component/s: Windows
    • Labels:
      None
    • Environment:

      SDK: 6.1.1.v20170613083237
      Appc CLI: 6.2.2/4.2.9
      Lumia 550 1.0
      Windows 10 ws-local

    • Story Points:
      5
    • Sprint:
      2017 Sprint 22 SDK, 2017 Sprint 25 SDK, 2017 Sprint 26 SDK, 2018 Sprint 01 SDK

      Description

      Description

      When calling insertRow with an existing row, if the row has been deleted then the application will freeze and error out, this code works fine on Android, need to check iOS

      var _window = Ti.UI.createWindow();
      var table = Ti.UI.createTableView({
          top: 0,
          bottom: 0
      });
       
      var tableData = [];
       
      for (var i = 0; i < 10; i++) {
          tableData.push(Ti.UI.createTableViewRow({
              title: "Row " + (i + 1)
      }));
      }
       
      table.setData(tableData);
       
      _window.add(table);
       
      table.addEventListener("click", function(e) {
       
          var row = table.data[0].rows[e.index];
       
          Ti.API.info('index');
          Ti.API.info(e.index);
          Ti.API.info(row.title);
       
      	console.log('delete row');
      	table.deleteRow(row);
          console.log('insertRow');
          table.insertRowBefore(0, row);
      });
      _window.open();
      

      Steps to reproduce
      1. Add the code above to an application
      2. Build for Windows
      3. Tap a row
      Actual

      Application freezes and errors out

      Expected

      Application should not freeze or error out,

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                kiguchi Kota Iguchi
                Reporter:
                eharris Ewan Harris
                Reviewer:
                Abir Mukherjee
                Tester:
                Samir Mohammed
              • Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Source Code