Have fun with Xojo

I had minutes to waste and a open project.

In a Canvas, I add the Open Event and put:

Me.AcceptFileDrop "" // In fact, I removed image/png),

In the same Canvas, I add teh DropObject Event (that falls into the WIndow at first *)
I put: (plus code to deal with the image since that was what I wanted to do):

If Obj.FolderItemAvailable Then MsgBox "DropObject" + EndOfLine + EndOfLine + Obj.FolderItem.Type

Drop a png image and got the message (I got dossier [Folder] instead of png or image or…)
Incidentally, the image is displayed by the unshared code as needed.

Drop a .txt file onto the Canvas and got the message (Texte [Text]).
As I was awaiting, the code crashed because a Text does not have .Width or .Height properties

Did I told you that I do not have an empty file type in that project ?
Did I told you that I do not have a “image/png” file type in that project ?

I know how to filter the drop item to reject unwanted file types, but since I had fun, I wanted to share this experience with you.

Remember: I checked that project with Xojo 2016r4.1 before I open this conversation.

  • A (double click to) select, cut / select the Canvas entry, paste was working fine.
    Drag and drop is not working for that.

El Capitan 10.11.6
Both Xojo 2015r1 AND 2016r4.1
@ my local (cold today) McDonald’s.