[Kst] branches/work/kst/kst1kde4/kst/src/libkst

Barth Netterfield netterfield at astro.utoronto.ca
Fri Nov 27 01:17:24 CET 2009


On November 26, 2009 07:04:35 pm Peter Kümmel wrote:
> Am Donnerstag, den 26.11.2009, 18:46 -0500 schrieb Barth Netterfield:
> > On Thursday 26 November 2009 18:26:39 Peter Kuemmel wrote:
> > > > This is a user preference question: do I want to be able to delete a
> > > > vector and everything it depends on from the data manager, or do I
> > > > have to start at
> > > > the top of the tree, eg,  remove the curve from the plot, delete the
> > > > curve,
> > > > then delete the vector...  1.x had a 'purge' button which would
> > > > repeatedly delete all unused object until everthing that was unused
> > > > was gone to make this more convenient.  That being said, I tend to
> > > > agree we should go back to the 1.x way.
> > >
> > > I don't know the data manager. Is it like a vector paint program? Then
> > > why not simply delete only marked objects?
> >
> > kst has a hierarchy of objects:
> >
> > DataSources (ie, files)
> > Primitives (vectors, scalars, strings, matrixes): can depend on
> > DataSources, or on DataObjects.
> > Data objects : inputs are primitives, outputs are primitives (eg,
> > equations, spectra)
> > Relations: inputs are primitives, can be rendered (ie, images and
> > curves).
> >
> > ViewItems: draw to the screen; can depend on relations (ie, plots) or
> > primitives (ie, labels can depend on strings and scalars)
> >
> > The data manager lists all of the objects which have been created, and
> > some info about each one.  From the data manager, one can delete or edit
> > the objects.
> >
> > The question is: should you be able to select and delete, eg, a vector,
> > which is currently used by a curve which is in a plot (in which case,
> > perhaps, the curve would be removed from the plot and deleted before the
> > vector was deleted) or should this be impossible until the curve was
> > removed from the plot and then deleted (or its inputs changed to
> > something else).
> 
> Sound like a model-view problem: the curve is the view of the vector.
> And in principle the curve would also disappear when the vector is
> deleted, and the curve could be deleted (disabling view) without
> removing the vector. But removing the vector without also removing
> the curve would break the mv-pattern. Are there reasons to do this
> (low memory), or is it even the standard way of using kst?

I should read up on my programming patterns :-)

The vector might also be used by a PowerSpectrum, which outputs new vectors, 
which are in turn used by an Equation, which outputs new vectors, which are in 
turn used by a curve.... which may be displayed in several different plots with 
different zoom levels, etc.

So... maybe the plots are the 'views'.   

You would never want to have a curve with an undefined input - which might 
(unless you define a null vector, or do some sort of arbitrary replacement) be 
what you would get if you deleted  its vector.

The user experience question is - should we let the user delete bottom up (in 
which case they might very well make a Big Blunder (TM) and delete something 
important) or make them delete top down (which is safe, but possibly tedious).

Kst 1.x did the latter, and I never minded it, since there was a 'purge' 
convenience function in the data manager to delete anything that was unused.

Kst2 currently does the former.



More information about the Kst mailing list