Re: [NEWBIE]: Active loading of browser
Re: [NEWBIE]: Active loading of browser
- Subject: Re: [NEWBIE]: Active loading of browser
- From: email@hidden (Heinrich Giesen)
- Date: Fri, 22 Oct 2004 11:40:42 +0200
Hello,
your code is much too complicated. You need not create a new cell,
and you do not need a local array. The matrix given as parameter
does all for you.
The statement
<x-tad-smaller>[matrix addRowWithCells:anArray]; is wrong</x-tad-smaller><x-tad-smaller>
</x-tad-smaller>because you add a lot of columns to a matrix which has only one
column.
Try this (written in mail):
- (void)browser:(NSBrowser *)sender createRowsForColumn:(int)column
inMatrix:(NSMatrix *)matrix {
NSEnumerator *enum1;
id aCell;
if ( column == 0 ) { // set no matter what -- will implement
other column checks once I get the first one working
enum1 = [[trackerApp projects] objectEnumerator];
Project *proj;
while (proj = [enum1 nextObject]) {
[matrix addRow];
aCell = [matrix cellAtRow:[matrix numberOfRows]-1 column:0];
[aCell setTitle:[[proj projectVitals] projectTitle]];
[aCell setRepresentedObject:proj];
// do more sttings for aCell
}
}
}
Good luck
Heinrich Giesen
--
Heinrich Giesen
email : email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden