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
forColumn: (NSInteger)column
{
NSBrowserColumn *bc;
NSScrollView *sc;
NSMatrix *matrix;
NSInteger i, rows, cols;
NSBrowserColumn *bc = nil;
NSScrollView *sc = nil;
NSMatrix *matrix = nil;
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];
cols = 1;
bc = [_browserColumns objectAtIndex: column];
if (!(sc = [bc columnScrollView]))
@ -3341,19 +3340,14 @@ static BOOL browserUseBezels;
}
[sc setDocumentView: matrix];
// Loading for item based delegate
{
// Now loop through the cells and load each one
id aCell = nil;
// Iterate over the rows...
for (i = 0; i < rows; i++)
{
aCell = [matrix cellAtRow: i column: 0];
id aCell = [matrix cellAtRow: i column: 0];
if (![aCell isLoaded])
{
BOOL leaf = YES;
id val = nil;
id child = nil;
child = [_browserDelegate browser: self child: i ofItem: _lastItemLoaded];
leaf = [_browserDelegate browser: self isLeafItem: child];
@ -3361,9 +3355,6 @@ static BOOL browserUseBezels;
[aCell setLeaf: leaf];
[aCell setStringValue: val];
[aCell setLoaded: YES];
_lastItemLoaded = child;
}
}
}
@ -3372,6 +3363,7 @@ static BOOL browserUseBezels;
if (column > _lastColumnLoaded)
{
_lastColumnLoaded = column;
_lastItemLoaded = child;
}
/* Determine the height of a cell in the matrix, and set that as the