Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2751] Row/section indexes not updated after "delete"

GitHub Issuen/a
TypeBug
PriorityTrivial
StatusClosed
ResolutionCannot Reproduce
Resolution Date2011-08-09T23:21:25.000+0000
Affected Version/sRelease 1.7.2
Fix Version/sSprint 2011-32
ComponentsiOS
Labelsedit, index, tableview
ReporterStephen Tramer
AssigneeReggie Seagraves
Created2011-04-15T03:28:33.000+0000
Updated2017-03-29T16:16:53.000+0000

Description

Just what it says. Not visible when interacting with the tableview via regular means, but any method which requires getting the row index to compute the NSIndexPath will be affected. Behavior is visible in KS by:

  • Base UI->Views->Table View->Delete Mode (2)
  • Delete a row
  • Click on the last row while still in edit mode

Repro steps rely on (currently pending) fix for #1330

Comments

  1. Stephen Tramer 2011-04-15

    This is no longer a super-priority due to the fact that my committed #1330 fix doesn't rely on internal row numbers. Can wait for a while, and will probably be nuked as part of a tableview rewrite to rely on different types of indexing.

  2. Pedro Enrique 2011-04-15

    Similar problem when editing rows. Explanation and example in http://support.appcelerator.com/tickets/ZNK-28616-794">HD Ticket #ZNK-28616-794.

    After moving rows around, the index is not updated.

    Ti SDK 1.6.2
    iOS 4.2 and 4.3

  3. Gerry Cardinal III 2011-04-15

    Whoever works on this and related table view tickets, please fix or confirm that the issue in this ticket is fixed:
    http://support.appcelerator.com/tickets/MMY-57876-424">http://support.appcelerator.com/tickets/MMY-57876-424

    Basically, this line of Objective-C code in TiUITableViewProxy.m > insertRowBefore: should be changed FROM:

    newrow.row = row.row == 0 ? 0 : row.row - 1;

    TO:

    newrow.row = row.row == 0 ? 0 : row.row;

  4. Reggie Seagraves 2011-08-09

    This problem no longer exists, fixed during another checkin.
  5. Lee Morris 2017-03-29

    Closing with reference to the above comments.

JSON Source