My app can open the type of file it is supposed to work with when I double click the file, AND the app is already running. However, when the app is not running yet and i double click a file, the app starts, but it does not open the file. Why could that be?
The app delegate implements the methods:
-(void) application:(NSApplication *)sender openFiles:(NSArray *)filenames {
for (NSString *name in filenames) {
NSLog(@"Openning files");
[self.topController addFileAtPath:name];
}
}
-(BOOL) application:(NSApplication *)sender openFile:(NSString *)filename {
NSLog(@"Openning file_");
[self.topController addFileAtPath:filename];
return YES;
}