Tk Library Source Code

View Ticket
Login
Ticket UUID: 1213123
Title: DropSite::register fails with multiple droptypes
Type: Bug Version: None
Submitter: neil1357 Created on: 2005-06-01 22:54:04
Subsystem: bwidget Assigned To: damonc
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2009-06-30 20:38:16
Resolution: Accepted Closed By: oehhar
    Closed on: 2009-06-30 13:38:16
Description:
If you specify multiple droptypes to DropSite::register
and one of the later droptypes does not contain all of
the operations that an earlier type supported, the
command will cause an error:

toplevel .f
frame .f.fr
DropSite::register .f.fr -dropcmd foo -dropovercmd bar
-droptypes {ABC {copy {} move {}} DEF {copy {}}}

can't read "drop(DEF,mod,4)": no such variable

I'm not sure about the BWidget drag'n'drop internals,
but I believe the problem is caused by the failure to
clear the "masklist" variable in dropsite.tcl:

--- ..\lib\BWidget-1.7.0\dropsite.tcl   2004-01-23
10:31:48.000000000 -0800
+++ C:\Program
Files\Fs2\Mips\Lib\BWidget-1.7.0\dropsite.tcl   
2005-06-01 15:53:24.708250000 -0700
@@ -150,6 +150,7 @@
         set drop(overcmd) $overcmd
         foreach {type ops} $types {
             set drop($type,ops) {}
+            set masklist {}
             foreach {descop lmod} $ops {
                 if { ![llength $descop] || [llength
$descop] > 3 } {
                     return -code error "invalid
operation description \"$descop\""
User Comments: neil1357 added on 2005-06-02 05:55:50:

File Added - 136889: dropsite.diff

Attachments: