• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [NEWBIE]: Active loading of browser
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [NEWBIE]: Active loading of browser


  • Subject: Re: [NEWBIE]: Active loading of browser
  • From: J Tichenor <email@hidden>
  • Date: Fri, 22 Oct 2004 10:02:36 +0100

Didn't think it would matter, since the object should be retained by the array, but... I'm not allocing a new BrowserCell at the head of my while loop and then releasing it at the end, and am still getting the crash.

J


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
References: 
 >[NEWBIE]: Active loading of browser (From: J Tichenor <email@hidden>)
 >Re: [NEWBIE]: Active loading of browser (From: j o a r <email@hidden>)

  • Prev by Date: Re: [NEWBIE]: Active loading of browser
  • Next by Date: gdb breakpoint crashes XCode
  • Previous by thread: Re: [NEWBIE]: Active loading of browser
  • Next by thread: Re: [NEWBIE]: Active loading of browser
  • Index(es):
    • Date
    • Thread