DropObject not working

Hi,

I have a window with a movieplayer in it. In the open event I have

me.AcceptFileDrop("????")

In the DropObject event I have.

if obj.FolderItemAvailable = true then MsgBox "boo" end if

I cannot drop a file on the movie player and get the “Boo” message.

If I put the same code in the Window Open event and DropObject then I get the “Boo” message when a file is dragged into the window

What am I doing wrong with the Movieplayer?

Nigel

Looks like there’s a workaround here: https://forum.xojo.com/34791-movieplayer-dropobject

Hi,

Thanks, that works. I had to create a sub class of the container control in the window as opposed to just dragging it in. That answer was from sometime ago and so things may have changed?

Thanks for the prompt reply!

Nigel

OS?

Hi,

Mac OS 10.12.3 Xojo 2017 r1.

On further investigation I may be mis reading the instructions. It says…

I would drag the container into the GUI in the middle with the “Window1” in it. Nothing happens when I do that, it just snaps back. If I drag the container into the left hand “Contents” section the Container appears in the contents. I can then drag it into my “Window1” in the GUI.

Any way it works.

Nigel

Glad it has been fixed. Just tested it on Linux and Windows without using container control, just a window and movie player, and found no issue. Make sure that you drop the file on top of movie player control not on the window.

Or in Window1.Open, use:

MoviePlayer1.AcceptFileDrop("????")

?