Launching App from Documents

I need to double-click on my application’s documents, and the have my application launch and open up the double-clicked document. Where do I find documentation/examples for that?

Thanks --Will

That sounds like an OS specific issue. in Windows you would set up file associations in the control panel, I am sure its a similar process for Mac/Linux?

Quick google search found this article for windows 10,

One for MAC (you may have a later OS but probably similar),

This can all be handled within Xojo. You receive the double clicked documents in the app.opendocuments event. See the docs for that event on how to handle single and multiple documents. If your file associations are correctly setup in a FileTypes object, (see docs) then you are good to go.

On macOS that’s true, but as Paul said, Windows and Linux require some extra effort.

Typically I’d suggest using an installer to get file associations on Windows and Linux though. You don’t want users having to go mucking through the control panel just to add this feature to your app.

For Windows you’ll want your installer to do this for you. It’s more automatic on Mac.

Some tips for Windows and Inno Setup are here:$file-type-associations

Video showing the technique: