Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

tkdnd installation

49 views
Skip to first unread message

Hans Herrmann

unread,
Mar 24, 2006, 12:57:51 PM3/24/06
to
Hi,
please help with the tkdnd installation under Windows xp.
After extraction I got libtkdnd10.dll. I copied it in diverse directories ...
package require tkdnd doesn't work.
Thanks
Hans

Michael Schlenker

unread,
Mar 24, 2006, 1:35:43 PM3/24/06
to
Hans Herrmann schrieb:
Is there a pkgIndex.tcl file that can load tkdnd?

If not, try the 'load' command instead, with the full path to the dll.

Michael

Georgios Petasis

unread,
Mar 24, 2006, 4:34:14 PM3/24/06
to
"Michael Schlenker" <sch...@uni-oldenburg.de> wrote in message
news:48isflF...@news.dfncis.de...

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]


Hans Herrmann

unread,
Mar 25, 2006, 12:11:25 PM3/25/06
to

"Georgios Petasis" <pet...@iit.demokritos.gr> schrieb im Newsbeitrag news:e01okn$1ma2$1...@ulysses.noc.ntua.gr...

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

Hans Herrmann

unread,
Mar 25, 2006, 12:12:20 PM3/25/06
to

"Michael Schlenker" <sch...@uni-oldenburg.de> schrieb im Newsbeitrag news:48isflF...@news.dfncis.de...

Hi Michael,

thanks for your answer, it works!

Hans

Hans Herrmann

unread,
Mar 25, 2006, 12:29:42 PM3/25/06
to

"Georgios Petasis" <pet...@iit.demokritos.gr> schrieb im Newsbeitrag news:e01okn$1ma2$1...@ulysses.noc.ntua.gr...
Hi Georgios,

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

0 new messages