develooper Front page | perl.tcltk | Postings from September 2018

[macOS] Tcl::pTk Drag&Drop

Thread Next
welle Ozean via tcltk
September 21, 2018 11:01
[macOS] Tcl::pTk Drag&Drop
Message ID:
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,
else {
$filePath = $tab->SelectionGet(-selection => $selection,
#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).


Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About