Skip to content

Commit

Permalink
[tidev#1530 state:fixed-in-qa] This is actually doing the right thing…
Browse files Browse the repository at this point in the history
… in Android. Blain and I walked through it and he agreed that iPhone should be throwing an exception. I added an exception handler to the test so that it deals with the expected exception. The delete from top is also correct. The test is actually very broken because tableview.data is actually an array of TableViewSections's not rows. It's a hold over from pre 0.9. The length of that array is 1 therefore it always remove index 0.
  • Loading branch information
donthorp committed Sep 2, 2010
1 parent 57c5515 commit 78ca20f
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,9 @@ button.addEventListener('click', function()
var index = tableview.data.length-1;
Ti.API.info("deleting row "+index);

tableview.deleteRow(index,{animationStyle:Titanium.UI.iPhone.RowAnimationStyle.UP});
try {
tableview.deleteRow(index,{animationStyle:Titanium.UI.iPhone.RowAnimationStyle.UP});
} catch (E) {
Ti.UI.createNotification({ message: E.message }).show();
}
});

0 comments on commit 78ca20f

Please sign in to comment.