I have this code, that should list the files in a folder, in Debugger console it is working and displaying my files. But i my app, only the last file is displayed. What am i doing wrong..?
(I am a totally newbee in cocoa)
IBOutlet NSTextField *minFilesDislayoutput;
NSFileManager *defaultManager = [NSFileManager defaultManager];
NSArray *filePath = [defaultManager directoryContentsAtPath"/PDF"];
int i , count = [filePath count];
for ( i = 0 ; i < count ; i++ ) {
NSLog(@" filepath is (%@)",[filePath objectAtIndex:i]);
[minFilesDislayoutput setStringValue: [filePath objectAtIndex:i]];
}
(I am a totally newbee in cocoa)
IBOutlet NSTextField *minFilesDislayoutput;
NSFileManager *defaultManager = [NSFileManager defaultManager];
NSArray *filePath = [defaultManager directoryContentsAtPath"/PDF"];
int i , count = [filePath count];
for ( i = 0 ; i < count ; i++ ) {
NSLog(@" filepath is (%@)",[filePath objectAtIndex:i]);
[minFilesDislayoutput setStringValue: [filePath objectAtIndex:i]];
}