Re: Cannot add TCC permission by dragging on macOS

LIANG ZHOU <[email protected]> Tue, 4 Nov 2025 23:57:54 -0800 (PST)
Newsgroups gmane.comp.lib.wxwindows.general
Message-ID <[email protected]>

The above task cannot be accomplished using wxFileDataObject. I found that 
the following code works, but I'm not sure if this usage is correct?

wxCustomDataObject customData(wxDataFormat(wxT("public.file-url")));
wxString wxsFileUrl = wxT("/usr/local/bin/test");
customData.SetData(wxsFileUrl.length(), wxsFileUrl.data());
wxDropSource dropSource(this);
dropSource.SetData(customData);
dropSource.DoDragDrop();

在2025年11月4日星期二 UTC+8 21:40:25<Igor Korot> 写道:

> Hi,
>
> On Tue, Nov 4, 2025 at 2:05 AM LIANG ZHOU <[email protected]> wrote:
>
>> I created a wxStaticBitmap control and executed the following code when 
>> handling the wxEVT_MOTION message.
>>
>> wxFileDataObject fileDataObj;
>> fileDataObj.AddFile(wxT("/usr/local/bin/test"));
>> wxDropSource dragSource(this);
>> dragSource.SetData(textDataObj);
>> dragSource.DoDragDrop();
>>
>> This method cannot add an executable file to the "Full Disk Access" list 
>> in System Preferences.
>> The dnd sample program also cannot drag nodes from the file system tree 
>> to the "Full Disk Access" list.
>> How should I implement the drag source? Thanks!
>>
>
> What’s you wx version?
>
> Thank you.
>
> -- 
>> Please read https://www.wxwidgets.org/support/mlhowto.htm before posting.
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "wx-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected].
>> To view this discussion visit 
>> https://groups.google.com/d/msgid/wx-users/ce2b7ad8-6b58-48be-a30a-9779052450adn%40googlegroups.com 
>> <https://groups.google.com/d/msgid/wx-users/ce2b7ad8-6b58-48be-a30a-9779052450adn%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
Please read https://www.wxwidgets.org/support/mlhowto.htm before posting.
--- 
You received this message because you are subscribed to the Google Groups "wx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/wx-users/4c1be5a5-b435-4bf0-81c2-c324454ced76n%40googlegroups.com.