Re: Drag-n-Drop in Perl/Tkx

[email protected] (Laurence Anthony)
Newsgroups perl.tcltk
Message-ID <[email protected]>
Hi Jeff,

Thanks for taking the time to help out. The script below is still not
working for me. Here is my progress. I have documented everything for others
to reference later.

First vfs and vfs::mk4 are not installed by default. These need to be
installed at the regular command line with:
teacup install vfs
teacup install vfs::mk4
This has been noted in earlier discussions.

Next, as you say, the path to the Perl tkkit needs to be adjusted. Mine is:
set tkkit "C:\Perl/lib\auto\Tcl\tkkit.dll"
I assume that the quotations around the path name are not needed, but this
is not clear.

Then, I needed to make C:\Perl\lib\auto\Tcl\tkkit.dll writeable
I did this by changing the settings in the properties of the tkkit.dll file.

Then, I needed to set the path for Tcl and most lib files. This was the same
path in your script:
set tcllib C:/Tcl/lib
(Do we quotations around the path name?)

The next line was cryptic for me:
# this is one of the built-in $::auto_path search areas
set tkkitlib tkkit/lib
Can we just use this path as is? More explanation would be nice.

The next line was OK.
# path to tkdnd lib files, complete with pkgIndex.tcl
set tkdnd $tcllib/tkdnd
(I assume here that we are setting tkdnd  to "C:/Tcl/lib/tkdnd" in my
installation.)
Note that in my installation, tkdnd was actually installed as tkdnd2.0. So,
I had to change the line to:
set tkdnd $tcllib/tkdnd2.0

The next line produced an error:
file copy -force $tkdnd $tkkitlib
The error was:
error copying "C:Tcl/lib/tkdnd/libtkdnd2.0.dll" to
"tkkit/lib/tkdnd/libtkdnd2.0.dll": no such file or directory

Any thoughts on how to get past the last step?

Laurence


>Original script from Jeff

##################################
package require vfs
set tkkit "C:/Perl10/lib/auto/Tcl/tkkit.dll" ; # set to correct path
file attributes $tkkit -readonly 0 ; # needs to be writable
vfs::mk4::Mount $tkkit tkkit ; # mounts file as dir 'tkkit'
# where you installed Tcl and most lib files
set tcllib C:/Tcl/lib
# this is one of the built-in $::auto_path search areas
set tkkitlib tkkit/lib
# path to tkdnd lib files, complete with pkgIndex.tcl
set tkdnd $tcllib/tkdnd
file copy -force $tkdnd $tkkitlib
vfs::unmount tkkit
exit
###################################
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.