我需要在NSTableView
中查看來自NSMutableArray
的數據。有代碼:將NSMutableArray設置爲NSTableView的數據源
- (IBAction)StartReconstruction:(id)sender
{
NSMutableArray *ArrayOfFinals = [[NSMutableArray alloc] initWithObjects:nil]; //Array of list with final images
NSString *FinalPicture;
NSString *PicNum;
int FromLine = [TextFieldFrom intValue]; //read number of start line
int ToLine = [TextFieldTo intValue]; //read number of finish line
int RecLine;
for (RecLine = FromLine; RecLine < ToLine; RecLine++) //reconstruct from line to line
{
//Start(RecLine); //start reconstruction
//Create path of final image
FinalPicture = @"FIN/final";
PicNum = [NSString stringWithFormat: @"%d", RecLine];
FinalPicture = [FinalPicture stringByAppendingString:PicNum];
FinalPicture = [FinalPicture stringByAppendingString:@".bmp"];
[ArrayOfFinals addObject:FinalPicture]; // add path to array
}
NSBeep(); //make some noise
}
我需要在我的應用程序中設置ArrayOfFinals作爲我的tableview的數據源。我在可可小白,我不知道我在哪裏需要進行連接:(
我看到YouTube上的教程,但它並沒有HEPL我。