Drag and Drop on the Application Icon

Some days ago, I see that Drag&drop documents on my application doesn’t work anymore. I wrote a comment in my code:

For an application to accept Drag and Drop, create a FileType, then go to the App tab and select the FileType on the right (property)

I don’t remember how it worked on previous Xojo version, but there is no more FileTypes in the App property of a project.
I searched, did some tests, and I understand I have to set the Role of the FileType I want to be opened by my application to something else than NoneView or Edit or Execute.

How was I suppose to know that? Is it the right way or am I wrong?


Will explain all of this.

I cannot go ahead because, like you, my experience is from the old days…

I found this page typing Role in the Documentation page (Cmd-K).

Yes thank you, I found the documentation page but it’s not clear that we need to put the role to View or Edit or Execute in order to allow drag&drop on the application.
* **Role**. The role indicates if your application is used only for viewing, editing and viewing or executing the file.

I think I used Execute when I read and write. Try them…

This should work:

The checkbox “File type is unique to this app” can be check or uncheck. And as I wrote it works until Role is not None. But how did you know that? Like me, testing different solution?
And those settings (Type , Role and Rank ) are in the MacOS Options, I will test if it change something on Windows.

Similar discussion.

That should only be checked if you are the originator of the type. For instance, if your app created PDF files, the checkbox should still be unchecked because PDFs come from Adobe.

1 Like