Re: Some newbie questions
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.tcl archive

Re: Some newbie questions

From: simonbachmann at bluewin dot ch <"simonbachmann>
Date: Sat Jul 30 2005 - 13:52:59 CEST

Larry W. Virden a écrit:
> Re: "read in" changes to the script
>
> Sure - all you need
>
> $ tclsh
> % proc abc {} {
> puts abc
> }
> % abc
> 123
> % proc abc {} {
> puts 123
> }
> % abc
> 123
> %
>

OK, but what if my script is in a file? source the file(s) again doesn't
work if the script contains commands that create widgets. In other
words, if in your example the proc 'abc' would contain as an example the
command 'button .b -text "Hello"', and then change the command to
'button .b -text "Bye"' re-executing the proc, would give an error: "a
window named .b already exists".
Received on Thu Sep 29 14:28:03 2005