Sorry for providing only “common sence” answer,
I do not have MacOS.

> Using Tcl::pTk I am trying to implement Drag&Drop on
> macOS without success. According to its documentation, Tcl::pTk should support
> it. This is what I am trying now (slightly adapted from my version for Windows
> and Perl/Tk):

> $MyWidget->DropSite(-dropcommand => [\&accept_drop, $tap],
> -droptypes => (['Local', 'tkdnd']));
>
> sub accept_drop {
>     my ($tab) = @_;
>
> my $filePath;
>      eval {
>                             if ($^O eq 'MSWin32') {
>               $filePath = $tab->SelectionGet(-selection => $selection, 
> 'STRING');
>                             }
>              else {
>                                             $filePath = 
> $tab->SelectionGet(-selection => $selection,
>                                   'FILE_NAME');
>                             }
>       }
> #DO THINGS with $filePath
> }
>
> I have downloaded a binary of tkdnd (libtkdnd2.8.dylib). How do I
> let Tcl::pTk know of this library? Or there is any way to implement it without
> adding new libraries (I am using the Tcl shipped with macOS).

AFAIK Tcl::pTk is unaware whether or not you have ‘tkdnd’ or not in your tcl/tk 
install, on top of which Tcl::pTk operates

First of all, you should make sure you can run demos from ‘tkdnd’.

You can ask about tkdnd installment on proper forums, so they will help you 
with this.

Then, Tcl::pTk will be just fine.
Given that your Tcl::pTk program already runs ok, it should be the same on 
macos.

Regards,
Vadim


Reply via email to