advertisement

Article:
  Understanding the NSTableView Class
Subject:   initialization question related to tables
Date:   2010-01-12 16:28:01
From:   stote
I was trying to initialize a NSMutableArray as a dataSource and could not get it to initialize the way I thought is should. Wondering what is wrong:


// NSMutableArray *taskList = [[NSMutableArray alloc] init];
taskList = [[NSMutableArray arrayWithCapacity:1] retain];



The commented out code was my 1st attempt. It resulted in a compiler warning "unused variable" and the array was not available to be used by NSTableView


The line below was how I managed to get it to initialize properly
thanks
Mike