Skip to content

Commit

Permalink
Fixed infinite loop when finished editing a tableview cell.
Browse files Browse the repository at this point in the history
  • Loading branch information
aparajita committed Apr 12, 2012
1 parent aeb2671 commit c028c0a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions AppKit/CPTableView.j
Original file line number Diff line number Diff line change
Expand Up @@ -3369,6 +3369,14 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
*/
- (void)_commitDataViewObjectValue:(id)sender
{
/*
makeFirstResponder at the end of this method causes the dataview to resign.
If the dataview resigning triggers the action (as CPTextField does), we come right
back here and start an infinite loop. So we have to check this flag first.
*/
if (_editingCellIndex === nil)
return;

_editingCellIndex = nil;

if (_implementedDataSourceMethods & CPTableViewDataSource_tableView_setObjectValue_forTableColumn_row_)
Expand Down

0 comments on commit c028c0a

Please sign in to comment.