[prev in list] [next in list] [prev in thread] [next in thread] 

List:       visual-tcl
Subject:    Re: source-ing in vtcl
From:       Stewart Allen <stewart () neuron ! com>
Date:       1997-08-25 15:34:51
[Download RAW message or body]

On Mon, 25 Aug 1997, Sandy Antunes wrote:

> I want to have all of my non-GUI stuff in a separate file from the VTCL
> window function.  So, I've tried to put the following into the vtcl file:
> 
>   source sandycustom.tcl
> 
> so a simple "load" immediately followed by "save as" should return the
> original file, without any expansion or alteration.
> 
> Unfortunately, when I load this into vtcl, then save again, I end up
> with garbage.  The new save file has done some strange expansion, with
> over a dozen HMesc_map commands, i.e.
> 
>     set HMesc_map(lt) {<}
>     set HMesc_map(szlig) {<DF>}
>     set HMesc_map(middot) {<B7>}
>     set HMesc_map(frac14) {<BC>}
>     [...]
> 
> HMevents, HMform_maps, HMinsert_maps, HMparam_maps, and loads of HM procs.
> 
> All I really want is for it to keep the "source" command as is, so one
> person can work on the custom stuff while another designs the GUI.  Is there
> a way to manage this?

 Sandy,

 The way vtcl works is by introspecting the application and tk working
 environment then saving any changes back into the project file. In your
 case, the "source" command causes your procedures to be loaded into the
 working intrepreter. These are then saved out when vtcl saves the
 project. Any globals you set (perhaps inadvertently) will get saved
 if the "Save Globals" preference is active.

 This is a limitation of the current implementation of vtcl. This is
 one of the big changes targeted for the next (non-bug-fix) release.

 -stewart-

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic