title: Associate my app with its custom file type in OSX and open file on double click
body: <p>My FMX app (MyApp, say) uses its own custom file type to store data files. Let's say these files have extension *.myext.</p>
  
  <p>I have managed to set up the info.plist so that OSX registers MyApp as the owner of file type *.myext. </p>
  
  <p>If MyApp is not yet open, it opens when double-clicking a file with that extension. Of course, the file does not open because I haven't written any code to handle the event because I don't know how to detect in OSX that the event has occurred.</p>
  
  <p>If MyApp is already open, I get, I get a message 'The document “xxxx.myext” could not be opened. [MyApp] cannot open files in the “[MyApp file]” format.'</p>
  
  <p>So my question is how MyApp can know that a file has been double-clicked so that it can launch a file open procedure?</p>