Partially correct implementation

This commit is contained in:
Gregory John Casamento 2024-07-23 13:08:35 -04:00
parent a1dd317d29
commit ffdf8fb6da

View file

@ -3281,15 +3281,14 @@ static BOOL browserUseBezels;
- (void) _performLoadOfItem: (id)item - (void) _performLoadOfItem: (id)item
forColumn: (NSInteger)column forColumn: (NSInteger)column
{ {
NSBrowserColumn *bc; NSBrowserColumn *bc = nil;
NSScrollView *sc; NSScrollView *sc = nil;
NSMatrix *matrix; NSMatrix *matrix = nil;
NSInteger i, rows, cols; NSInteger i = 0, rows = 0, cols = 1;
id child = nil;
// Ask the delegate for the number of rows // Ask the delegate for the number of rows for a given item...
rows = [_browserDelegate browser: self numberOfChildrenOfItem: item]; rows = [_browserDelegate browser: self numberOfChildrenOfItem: item];
cols = 1;
bc = [_browserColumns objectAtIndex: column]; bc = [_browserColumns objectAtIndex: column];
if (!(sc = [bc columnScrollView])) if (!(sc = [bc columnScrollView]))
@ -3341,37 +3340,30 @@ static BOOL browserUseBezels;
} }
[sc setDocumentView: matrix]; [sc setDocumentView: matrix];
// Loading for item based delegate // Iterate over the rows...
{ for (i = 0; i < rows; i++)
// Now loop through the cells and load each one {
id aCell = nil; id aCell = [matrix cellAtRow: i column: 0];
if (![aCell isLoaded])
{
BOOL leaf = YES;
id val = nil;
for (i = 0; i < rows; i++) child = [_browserDelegate browser: self child: i ofItem: _lastItemLoaded];
{ leaf = [_browserDelegate browser: self isLeafItem: child];
aCell = [matrix cellAtRow: i column: 0]; val = [_browserDelegate browser: self objectValueForItem: child];
if (![aCell isLoaded]) [aCell setLeaf: leaf];
{ [aCell setStringValue: val];
BOOL leaf = YES; [aCell setLoaded: YES];
id val = nil; }
id child = nil; }
child = [_browserDelegate browser: self child: i ofItem: _lastItemLoaded];
leaf = [_browserDelegate browser: self isLeafItem: child];
val = [_browserDelegate browser: self objectValueForItem: child];
[aCell setLeaf: leaf];
[aCell setStringValue: val];
[aCell setLoaded: YES];
_lastItemLoaded = child;
}
}
}
[bc setIsLoaded: YES]; [bc setIsLoaded: YES];
if (column > _lastColumnLoaded) if (column > _lastColumnLoaded)
{ {
_lastColumnLoaded = column; _lastColumnLoaded = column;
_lastItemLoaded = child;
} }
/* Determine the height of a cell in the matrix, and set that as the /* Determine the height of a cell in the matrix, and set that as the