On Tue, 27 May 1997, Troy Monaghen wrote:
> In debugging a strangeness that was happening whenever I loaded a file into
> vtcl I discovered that vtcl actually *runs* the init and main routines when
> a file is loaded. Some experimentation revealed that init must execute
> without error during this load time in order for vtcl to continue loading
> the application, but it seems that it doesn't care if main runs correctly
> or not.
[...]
> One other word of warning is to make sure all your opening and closing
> braces match in your procedures. I've *painfully* lost several pieces of an
> application because I saved it with ummatched braces. The problem actually
> seems to be when vtcl loads the file back in (i.e. close it and then open
> it)... I think it does not see the intended start and end of the
> procedures. I have been able to recover from this by fixing the mismatched
> braces with a text editor... but only if I catch it before I re-open the
> file in vtcl and then overwrite it by saving it again. [I've actually now
> taken to making backup copies between each invocation of vtcl to insure I
> don't loose anything].
the current application model is rather fragile and relies on tcl sourcing
files flawlessly. the next release (1.10) will be the last version that
has this liability. going forward I will implement a multi-file project
format that doesn't do as much "snooping" of the widget and variable/
procedure space for saving/loading. it will also allow integration with
other editors and source control systems. I also want to abstract the widget
storage format for possible integration with other Tk-enabled languages.
I can't remember if 1.09 did this but 1.10 saves a .bak copy of
any file you save over.
-stewart-