good point, but it shouldn't even be like that, because imagine you do :
set plugin "example plugin"
set win .$plugin
label $win
then
label $win.something
or
$win configure ...


what will happen is that it will fail since $win window does not exist, or 
$win.something "invalid path' 
since the parent does not exist...
the fix would be :
set plugin "example plugin'
set win .$plugin
set win [label $win]

Also, you should be able to make it work even with a space, you just need to do 
an [eval [list $win] ...] 
chameleon works with paths containing spaces, look at how chameleon does that...
your 'workaround' is not a workaround, it will only generate more problems, I'm 
sure...

KKRT


On Fri, May 11, 2007 at 09:35:23PM +0100, Tom Hennigan wrote:
> Cheers tom I've changed it to do that :-)
> 
> On 11 May 2007, at 21:22, [EMAIL PROTECTED] wrote:
> 
> >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
> 

> -------------------------------------------------------------------------
> 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


-------------------------------------------------------------------------
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

Reply via email to