I know it's picky, but shouldn't you also regsub all existing '_' into '__'
to avoid two different plugins, e.g 'example plugin' and 'example_plugin'
having the same window path name? (A long shot, I know, but maybe worth
doing just for completeness)
Tom
On 11/05/07, [EMAIL PROTECTED] <
[EMAIL PROTECTED]> wrote:
Revision: 8610
http://svn.sourceforge.net/amsn/?rev=8610&view=rev
Author: tomhennigan
Date: 2007-05-11 12:16:59 -0700 (Fri, 11 May 2007)
Log Message:
-----------
Fix a bug with buttons2labels. By adding "" to the button & label
pathnames.
I noticed the bug when I tried to configure a plugin with a space in it's
name. So I also used regsub to remove spaces in the window pathname in
plugins.tcl.
Modified Paths:
--------------
trunk/amsn/amsncore.tcl
trunk/amsn/plugins.tcl
Modified: trunk/amsn/amsncore.tcl
===================================================================
--- trunk/amsn/amsncore.tcl 2007-05-11 18:42:41 UTC (rev 8609)
+++ trunk/amsn/amsncore.tcl 2007-05-11 19:16:59 UTC (rev 8610)
@@ -315,13 +315,13 @@
unset options(-command)
}
if { [info exists options(-overrelief)] } { unset
options(-overrelief) }
- eval label $pathName [array get options]
+ eval label "$pathName" [array get options]
if { [info exists command] } {
puts $command
bind $pathName <<Button1>> "$command"
}
} else {
- eval ::tk::button2 $pathName $args
+ eval ::tk::button2 "$pathName" $args
}
}
}
Modified: trunk/amsn/plugins.tcl
===================================================================
--- trunk/amsn/plugins.tcl 2007-05-11 18:42:41 UTC (rev 8609)
+++ trunk/amsn/plugins.tcl 2007-05-11 19:16:59 UTC (rev 8610)
@@ -697,7 +697,8 @@
}
#name of the configuration window
- set confw ${w}.winconf_${selection}
+ #it's better not to have spaces in a window path
+ set confw ${w}.winconf_[regsub -all " " $selection "_"]
#If the window is already here, just raise it to the front
if { [winfo exists $confw] } {
This was sent by the SourceForge.net collaborative development platform,
the world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Amsn-commits mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/amsn-commits
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Amsn-devel mailing list
Amsn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amsn-devel