[Kst] .kst file format

C. Barth Netterfield netterfield at physics.utoronto.ca
Mon Jun 14 16:34:51 CEST 2004


On Thursday 10 June 2004 8:53 pm, George Staikos wrote:
> I spent some time debugging Kst files and why the old ones don't load
> properly.  There is no code that picks up plots and places them in a
> "default view".  I think this will be conceptually hard to implement with
> the current <window> implementation.  It presently looks like this:
>
> <plot>
> </plot>
> <window>
>    <plot>foo</plot>
> </window>

This is the behavior consistent with how all of the other objects are treated 
by .kst.

I think it is in fact easy to be backwards compatible.  

In loading make a PlotList of all plots which have been loaded.

At the end of loading put 

if (no windows have been defined) {
  make a default window
  attach all plots to it
}

> So "plot" is loaded but not hooked into a window until the <window> node
> references it.  I was envisioning something more like this:
> <window>
>    <plot>
>    // entire plot body
>    </plot>
> </window>
>
> This allows us to be easily backwards compatible with old Kst files, but
> not the other way around.  I don't think that matters though.  Even if the
> old Kst can load new Kst files, it can't properly render them.  This format
> allows us to load all plots inline too, which I think is a bonus (less
> complicated).  Again, it does prevent single plot in multiple views, but we
> decided against that so I think it's fine.

This approach is OK, but inconsistent with the way everything else is done.



More information about the Kst mailing list