Dragitem.Handle is 0 on macOS

I just noticed that DragItem.Handle (which is still API 1.0, so an Integer) returns 0 on macOS 11.6.1 with Xojo 2031r3.0. This makes NSDragInfoMBS fail with a Nil value too.
Can someone confirm for r3.1 and/or Montery?

Please report as bug.
handle should not be nil, at least once the relevant OS object was created.

That was a good point. Handle exists in DropObject, but not when it is created inside a MouseDrag event, even not after Drag has been called. So the example code for DragItem.Handle is wrong or rather this is a bug.

1 Like

Well, it may be only valid if the DragItem has been passed to the OS.

<https://xojo.com/issue/67151>

Found also this one – DesktopListbox.DragRow event does not fire.
<https://xojo.com/issue/67152>

Not by what the docs say.

I added some information to the second Feedback case:

The DragRow event fires as soon as “Allow Row Dragging” is set to true. So it’s possible that in the conversion the value was set to false. See screenshot.

1 Like