summaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
Diffstat (limited to 'demos')
-rw-r--r--demos/complex_source.tcl4
-rw-r--r--demos/simple_source.tcl2
2 files changed, 4 insertions, 2 deletions
diff --git a/demos/complex_source.tcl b/demos/complex_source.tcl
index 3255ea8..717231b 100644
--- a/demos/complex_source.tcl
+++ b/demos/complex_source.tcl
@@ -1,5 +1,6 @@
package require tkdnd
catch {console show}
+set filename [file normalize [info script]]
##
## Drag source
@@ -16,7 +17,7 @@ proc my_data {} {
list copy [list \
DND_HTML {<html><p>Some nice HTML text!</p></html>} \
DND_Text {Some nice dropped text!} \
- DND_Files [list /tmp/some_nice_dropped_file] \
+ DND_Files [list $::filename $::filename] \
]
};# my_data
@@ -36,4 +37,5 @@ foreach type {DND_HTML DND_Text DND_Files} {
bind $w <<DropEnter>> {%W state active}
bind $w <<DropLeave>> {%W state !active}
bind $w <<Drop>> [list my_drop %W %CPT %D %A]
+ # bind $w <<DropPosition>> {puts "Common types: %CTT"; return copy}
}
diff --git a/demos/simple_source.tcl b/demos/simple_source.tcl
index 53b0df3..2cff6d3 100644
--- a/demos/simple_source.tcl
+++ b/demos/simple_source.tcl
@@ -10,7 +10,7 @@ tkdnd::drag_source register .drag_source_text DND_Text
tkdnd::drag_source register .drag_source_files DND_Files
## Event <<DragInitCmd>>
-set filename [info script]
+set filename [file normalize [info script]]
bind .drag_source_text <<DragInitCmd>> \
{list copy DND_Text {Some nice dropped text!}}
bind .drag_source_files <<DragInitCmd>> \