Is there any plans to supprot DRAGTYPE_COMMAND in the future?
-
Hi Community!
I see that drag and drop in the Tree View and GeUserArea in the Python SDK does not currently support Command and the Command Palette.
I wonder if the future will support it?
-
Hello @gheyret,
Thank you for reaching out to us. @m_adam, our Python dev is on vacation, and only he can answer this with certainty.
I can tell you that we had no immediate plans to do this. The second question would be then probably if we would want to do this. And for the classic API, when there are these obvious gaps in the Python API (compare with C++ below), then there was usually a reason why they left that gap there and that reason was often void pointers.
There are harmless cases of
DRAGTYPE_COMMAND
where you only get the ID of the incoming command and then justCallCommand
that ID, as for example shown in our C++ examples. The problem is thatDRAGTYPE_COMMAND
can be accompanied by a void pointer in its drag data, i.e., arbitrary binary data where the recipient then has to cast them into their right form. You cannot port that to Python because in Python there is no such thing as casting. This might be a reason why this has not been ported to Python.We could of course just ignore the
data
field in a DragAndDrop instance when porting this to Python, but that could make the whole event pointless. In the end only Maxime can give here a definitive answer, but for now it is, "no, we do not have any plans".Cheers,
Ferdinand -
Hi @ferdinand
I've seen it in a "Not Supported" state for years, so I came to ask you.
As a third party developer, I would love to be able to do more, but like you said, a lot of things may have to be abandoned for a while because of Python limitations.
Anyway, thank you for your friendly reply as usual. -
Hi I've added DRAGTYPE_COMMAND in my backlog (no promise on when it will happen, since this is a pretty low priority feature).
DRAGTYPE_CMDPALETTE will remain as it is, since it's mostly used internally, and even in C++ you can't really use it.Cheers,
Maxime. -
Hi @m_adam
It's nice to hear that, and thank you!