Drag and Drop composite data object problems on Catalina
Transana <[email protected]>
| Newsgroups | gmane.comp.python.wxpython |
|---|---|
| Message-ID | <[email protected]> |
Hi all,
I'm trying to get a project working on Catalina that I've had going with
wxPython for a very long time. I'm currently using python 3.7 and
wxPython 4.1.0.
In part of my program, I can drag formatted text from a wx.RichTextCtrl
and drop it on a wx.TreeCtrl node. That same TreeCtrl can also receive
information about media files, as well as meaningful drops of other
wxTreeCtrl nodes. It works on Windows 10. (This code has also worked
for a long time on python 2.7 and wxPthon 3.0.2.0 and earlier.)
But on Catalina, when I call my wx.CustomDataObject's DoDragDrop()
method, I would get this message:
'QuoteDragDropData' is not a valid UTI string. Cannot set data for an
invalid UTI.
I eventually figured out that Catalina expects wx.DataFormat creation in
a different way than what I am used to. Instead of creating my
CustomDataFormat drag/drop object with:
cdo = wx.CustomDataObject(wx.DataFormat("QuoteDragDropData"))
when creating my Quote data object, I instead have to say:
cdo =
wx.CustomDataObject(wx.DataFormat("application.Transana.QuoteDragDropData"))
(My application is named Transana.)
As so often happens, the act of creating a question for the list
revealed the answer to that question. It took me long enough to figure
out that I thought I'd document this here in case others run into the
same problem.
Also, would anyone be willing to explain to me the underlying reason for
this difference? I'd love to understand what I had to do a bit better.
Thanks,
David
--
David K. Woods, Ph.D.
President, Researcher, and Lead Transana Developer
https://www.transana.com
Pronouns: he, him, his
--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/wxpython-users/fe513d58-1f8b-0b77-6e5e-8ef4ed97d53b%40gmail.com.