Re: [NEWBIE]: Active loading of browser
Re: [NEWBIE]: Active loading of browser
- Subject: Re: [NEWBIE]: Active loading of browser
- From: j o a r <email@hidden>
- Date: Fri, 22 Oct 2004 10:57:52 +0200
Is it really good to use the same cell instance for all rows? It seem
to me that you should create a new instance per row?
j o a r
On 2004-10-22, at 10.36, J Tichenor wrote:
- (void)browser:(NSBrowser *)sender createRowsForColumn:(int)column
inMatrix:(NSMatrix *)matrix {
NSEnumerator *enum1;
NSBrowserCell *aCell = [[NSBrowserCell alloc] init];
NSMutableArray *anArray = [NSMutableArray array];
int index = 0;
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]) {
[aCell setTitle:[[proj projectVitals] projectTitle]];
[aCell setRepresentedObject:proj];
if ([proj countOfEpisodes] > 0)
[aCell setLeaf: NO];
else [aCell setLeaf: YES];
[anArray addObject:aCell];
}
[matrix addRowWithCells:anArray];
}
}
_______________________________________________
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