Drag & Drop not working on macOS Sonoma?

Ah yes, you’re right, API1 would indeed still compile. And with your comment, I think I know what’s going on here and what Emile has done…

  1. There’s a FileTypeGroup named “GraphicFileTypes”
  2. Within this FileTypeGroup there are definitions for the various graphics file types to be used

At first blush, this took me for a loop as I thought there was some hidden or undocumented shortcut called GraphicFilesType somewhere. Guess not.

Also as Drag & Drop isn’t entire working as expected or the documentation is off, I’ve created the following…

#76173 DesktopCanvas.AcceptPictureDrop Doesn’t Work Or Documentation Issue

Feel free to thumbs up and/or add on to the explanation.

SomeFileTypeGroup.All() is a method that returns a string containing all the defined file types in that group. For example:

Sub Opening() Handles Opening
  MessageBox  "FileTypeImages.All = """+FileTypeImages.All+""""
End Sub

I added some information.

Me too. And here is more information I’ve not wrote there:

Files are one kind of object, Pictures are another, the way to handle each one differs, and you can accept one, or another, or both; and detect and handle each case in the DropObject() event.

One thing to note: In older versions of Xojo, .AcceptPictureDrop did allow users to drag and drop a file that is a picture. The current release of Xojo doesn’t, and the documentation hasn’t been updated to say that.

@John_McKernon Would you mind adding this to the ticket?

Gee, I can drop a file with a Picture in it on a Control, in fact that’s what pretty much all of my users have been doing for years until this stopped working. Think about it: A user has a photo on their desktop, it’s obviously a file. They drag and drop it into a control in an app. Or they go to a scrapbook and copy a photo from it, which puts it onto the clipboard- what’s next? How do they drag and drop it onto a control?

If not via a file or a clipboard, how is AcceptPictureDrop supposed to be used?

Dragging a picture from another app (like browser, Word document, etc.)

@John_McKernon You might also want to review my comment within the issue here. There was some discussion around whether AcceptPictureDrop is even necessary if as AcceptFileDrop is what ultimately resolves the issue for you (e.g. file drag and drop).

I made a case that users won’t know the difference, so being able to drag from a file or from say a picture in a web browser is likely a better UX especially as most users won’t have any idea of the technologies used. So keeping both in might be prudent depending upon your own use case and the experience you’re crafting.

He Paste it into ypur Application. No Drag and Drop involved in that operation.