I need my application to detect how many files have been dumped to the dock icon. For this, I use the application: openFiles: method
- (void)application:(NSApplication *)sender openFiles:(NSArray *)filenames
{
NSLog(@"%d",[filenames count]);
}
But, unfortunately, files are sometimes divided into groups. So, for example, I dragged 3 files onto the dock icon and got this output:
2
1
How could this be?
source
share