How can I open my app file

I have created a desktop app with custom extension file.
But it is not opening individually after saving.

For Example:
I saved a file with name “try” it is opening using software.
But when I open it individually, file is not opening.

How can I fix this?

What is the file extension ?

Share code you actually use to open the file.

Is file contents Text or Binary ?

Have-you read this pdf:
Introduction to Xojo Programming Book

i think you are looking for this event.
https://documentation.xojo.com/api/user_interface/desktop/desktopapplication.html.DocumentOpened
right click app at the ide/contents
add to “app” event handler … DocumentOpened

the file name should also appear in System.CommandLine

code for opening file

var NewWindow As new MainWindow
NewWindow.Show

This opens a new window. It have nothing to do with files.

Instruction (and example) related to how to open / read a text file:
https://documentation.xojo.com/api/files/textinputstream.html

You are now a developer, no more a user. So as a user, you as-k for a new window.

As a developer, you may have to create a new window (to put the file contents), but you also have to write the code to load the file contents and place it into the correct Control in the window.

In short: think different !

I think you need to look into File Type Groups, here you will detail your application and tell you built application to be linked to your file type (extension etc).

  • Open your apps source code in Xojo
  • Select Insert File Type Group from the Insert menu
  • Fill in the details of the file type:

In the Type enter Editor. Put your extension in. Provide an icon for the file type. For Mac you need to set the check box for ‘file type is unique to this app’ and put in a UTI.

This will tell Finder on Mac and Explorer on Windows that when your unique type is double clicked to open in your application. Is that what you are asking about?

Pretty sure that’s not going to work. At least not on Windows. Registry setting is required: Custom URI Schemes On Windows – Xojo Programming Blog

You would think that the registry setting would be placed by the Xojo code for the Group, but if it’s not that’s fine. It is how it works on Mac.