mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-09-02 08:53:37 +00:00
Merge pull request #1876 from cacaodev/CPTableView-viewForRow-infinite-loop
Fixed: a view outside a CPTableView causing an infinite loop when becomes FR.
This commit is contained in:
+11
-3
@@ -2026,11 +2026,12 @@ NOT YET IMPLEMENTED
|
||||
return -1;
|
||||
|
||||
var cellView = aView,
|
||||
contentView = [[self window] contentView];
|
||||
contentView = [[self window] contentView],
|
||||
max_rec = 100;
|
||||
|
||||
while (1)
|
||||
while (max_rec--)
|
||||
{
|
||||
if (cellView == contentView)
|
||||
if (!cellView || cellView === contentView)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
@@ -5093,6 +5094,13 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
|
||||
{
|
||||
var responder = [[self window] firstResponder];
|
||||
|
||||
if (![responder isKindOfClass:[CPView class]] || ![responder isDescendantOf:self])
|
||||
{
|
||||
_editingRow = CPNotFound;
|
||||
_editingColumn = CPNotFound;
|
||||
return;
|
||||
}
|
||||
|
||||
_editingRow = [self rowForView:responder];
|
||||
_editingColumn = [self columnForView:responder];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user