Hello, Zaftigers. I got an interesting bug report from the field, and I’m a little surprised I never thought of it. There appear to be a few separate but related issues.
I have an application that reads audio files - specifically, WAV, AIFF and MP3 files.
On both Mac and PC you can right click a file and then use “Open With…” to select the application that you actually open the file with.
- On the Mac, at least, my application does not come up in the list of applications that will open MP3s.
How do I add my application to the “Open As…” menu for MP3, WAV, etc files?
On the Mac, when I drag an MP3/etc over my application’s file in the Finder, it does NOT light up. (Drag and drop into the running application runs and with great slickness, M-x praise-jules!) How can I make it so that I can drag audio files over my applications file and drop them to open the application with those files?
I can force the program to “Open With…” an MP3. I was not at all surprised to discover that, however, the file that was “opened” doesn’t actually open up in my program, because I don’t have any idea how to detect if this has happened. I tried a few experiments, like looking at juce::JUCEApplication::getCommandLineParameters() (which was empty), but found nothing.
How do I detect the Open With… command going off?
I tried to search here but unfortunately “Open With…” matches far too much. Any ideas?