title: Corona SDK: TableView index not updating
body: <p>I've got a problem with Corona SDK and the tableview, but allow me to show the code first:</p>
  
  <pre><code>function functions.onRowTouch( event )
    print("ONROWTOUCH EXECUTING")
  
    if event.phase == "tap" or event.phase == "press" then
      print("EVENT.TARGET.INDEX: " .. event.target.index)
      editItemNum = event.target.index
      print("editnum: " .. editItemNum)
      print("ITEM tapped")
      if saveData.names[event.target.index] ~= nil then
          function functions.pressRow(event)
              print("ROW NUM: " .. event.target.index)
              print("EDITNUM = " .. editItemNum)
              functions.pressItem()
              return true
          end
          event.target:addEventListener("tap", functions.pressRow)
      end
    elseif event.phase == "swipeLeft" then
      print("SWIPING LEFT")
      tableView:deleteRows({event.target.index}, {slideLeftTransitionTime=450})
      table.remove(saveData.names, editItemNum)
      table.remove(saveData.dates, editItemNum)
      table.remove(saveData.amounts, editItemNum)
      loadsave.saveTable(saveData, "payMeBackTable.json")
      print("ROW DELETED")
    end
  end
  </code></pre>
  
  <p>I'm sorry for the indentation, stackoverflow just kept changing it...
  But here is my question:
  in the event.phase == "tap", I'm assigning editItemNum to event.target.index. After that I delete a row that is tapped. This works great for the first time. I'm using this line of code to achieve that btw: </p>
  
  <pre><code>tableView:deleteRows({editItemNum}, {slideLeftTransitionTime=400} )
  </code></pre>
  
  <p>So the delete function knows what to delete because "editItemNum" gets the value of the row index.
  But once I deleted the row, the index numbers of the rows are not adapting. So for example I've got 3 objects in my table: 1,2,3. Now I delete the middle one, so I should get: 1,2. But instead when I touch the second row, the index is still 3. So visually that'd look like: 1,3.
  It just makes no sense in my eyes and I really don't see anything wrong with my code. I did find a post on the Corona SDK forums with a bug report for this issue, but that was 2 years ago and was resolved...
  Any help? :)</p>
  
  <p>Kind regards,
  Bram</p>