If not, try the 'load' command instead, with the full path to the dll.
Michael
Does the pkgIndex.tcl conatins the following?
namespace eval ::dnd {
##
## This function will allow the loading the shared library, found in the
## following places:
## 1) The first location searched is a directory derived from the
platform
## we are running. For example under windows an attempt will be made to
## load the library from the "Windows" subdirectory, or from "Linux", if
## we are running under Linux. This allows us to ship tkdnd with support
## for multiple operating systems simultaneously.
##
## 2) If the above fails, we revert to the original behaviour of "load".
proc _load {dir} {
set version 1.0
switch $::tcl_platform(platform) {
windows {
if {[catch {load [file join $dir libtkdnd[string map {. {}} \
$version][info sharedlibextension]] tkdnd} error]} {
## The library was not found. Perhaps under a directory with
the
## OS name?
if {[catch {load [file join $dir Windows \
libtkdnd[string map {. {}} $version][info \
sharedlibext]] tkdnd} error2]} {
return -code error "$error\n$error2"
}
}
}
default {
if {[catch {load [file join $dir \
libtkdnd$version[info sharedlibextension]] tkdnd} error]} {
## The library was not found. Perhaps under a directory with
the
## OS name?
if {[catch {load [file join $dir $::tcl_platform(os) \
libtkdnd$version[info sharedlibextension]]
tkdnd}]} {
return -code error $error
}
}
}
}
source [file join $dir tkdnd.tcl]
package provide tkdnd $version
}
}
package ifneeded tkdnd 1.0 [list ::dnd::_load $dir]
Hi Georgios,
thanks for your answer!
After creating a pkgIndex.tcl and copying your script in it, "package require tkdnd 1.0" works.
Another question:
Can I use your plugin to drag 'n drop a (source)file in multiple directories simultaneously?
Thanks for a simple example?!
Hans
Hi Michael,
thanks for your answer, it works!
Hans
something I do wrong:
after first "package require tkdnd" it fails with the message:
couldn't read file "C:/Programme/Tcl/lib/tkdnd/tkdnd.tcl": no such file or directory
After second "package require tkdnd" it works with:
1.0
What's wrong?
Hans