summaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorpetasisg@gmail.com <petasisg@gmail.com@f3661a36-4baa-549a-d6c7-40e0ffef350e>2014-08-13 18:33:48 (GMT)
committerpetasisg@gmail.com <petasisg@gmail.com@f3661a36-4baa-549a-d6c7-40e0ffef350e>2014-08-13 18:33:48 (GMT)
commita180f18ae3f3ada9c56d86479135d64d4c8eae6e (patch)
treea1b0b5533154d468366fda5a7d963967c3b2ae1d /demos
parent82b4c65e44fe98ef9083600b6a459464a23d94ed (diff)
downloadtkdnd-a180f18ae3f3ada9c56d86479135d64d4c8eae6e.zip
tkdnd-a180f18ae3f3ada9c56d86479135d64d4c8eae6e.tar.gz
tkdnd-a180f18ae3f3ada9c56d86479135d64d4c8eae6e.tar.bz2
OSX updates
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>> \