[Kst] kdeextragear-2/kst/kst

George Staikos staikos at kde.org
Sun May 25 20:02:02 CEST 2003

On Thursday 22 May 2003 18:04, Barth Netterfield wrote:

> -Why does countScalarsAndVectors exist?  Shouldn't the sizes be known in
> the constructor?  In which case they the sizes should be private members.

  We skip the ones we don't know how to deal with.  It is not going to be 
needed anymore though.  I moved the same checks up higher in the code, so 
it's superfluous now.

> -Given that, shouldn't the constructor allocate the *inArrayLengths etc,
> rather than doing this (and undoing this) in update()?

   Sure it definitely could.  Small optimisation, but worthwhile.  I'll add 
that after the dataObject changes.

> -Also, it seems that the constructor needs the list of input vectors and
> input scalars - I was going to have the dialog create ordered lists (parsed
> from the combo boxes) and pass them into the constructor.  These lists
> should be kept in the KstPlugin as private members.

   Possibly.  I think actually it would be better to allow these things to be 
set later on because they may change (edits, etc).  In that case we can make 
an overloaded constructor to do this, but the real core of the vector/scalar 
counting and manipulation has to be elsewhere.

> -the plugin (constructor) needs to create its own slave vectors and
> scalars, which need to be kept in its own private lists.  The constructor
> also needs to insert them all into doc->vectorList and doc->scalarList, so
> doc->vectorList and doc-scalarList need to be passed into the constructor.

   Doe sit need to create them, or does the dialog create them and add them to 
the doc list?  Then we just tell the plugin to pick up a reference to the 
existing ones...

> -When you create a slave vector, you need to insert its scalars into the
> doc's scalar list with slave->insertScalarsInList(slist) (I just discovered
> that I miss this in lots of places - a sure sign of a bad architecture -
> Perhaps we need a static private member which stores doc->slist for all
> slave vectors, and then put insertScalarsInList in doc->slist in the
> slave's constructor...

   Yes I didn't do this yet.  I was hoping we could do this after the cleanup.

> -The names of the output (slave) vectors and scalars must be unique, so in
> the dialog, the entries should be line inputs, not combo-boxes (since
> existing vector names are by definition invalid).

    Already done.

> -save needs to save the tag names of all of the input and output scalars.

   Already done.

> -The creator for reading a kst file needs to read and set them.

   Already done [mostly].

George Staikos
KDE Developer				http://www.kde.org/
Staikos Computing Services Inc.		http://www.staikos.net/

More information about the Kst mailing list