[Kst] Re: branches/work/kst/portto4/kst/src/libkstapp

Barth Netterfield netterfield at astro.utoronto.ca
Tue Mar 22 13:30:42 CET 2011


On Mon, Mar 21, 2011 at 9:26 PM, Peter Kümmel <syntheticpp at gmx.net> wrote:
> On 21.03.2011 22:49, Peter Kümmel wrote:
>> On 21.03.2011 21:54, Nicolas Brisset wrote:
>>>> What about this patch for (b) ? We don't have to touch any plugin
>>>> code.
>>>>
>>>> Seems to work with the polynominal fit.
>>> Yes, I confirm that the curves get loaded correctly. However labels are broken (I guess that's what you meant by polynomials).
>>
>> After loading the label uses X71, X72, and X73, but the label dialog shows x^0==X70, X71, and X72
>
> The problem is:
>
>     <variables>
>         <datavector>
>         <scalar initialXNum="25"/>
>     </variables>
>     <objects>
>         <plugin type="Polynomial Fit" initialVNum="3" initialXNum="25" initialPNum="1">
>             <inputscalar type="Order Scalar" tag="2 (X25)"/>
>             <outputvector type="Fit" tag="Fit"/>
>         </plugin>
>     </objects>
>
>
> In <variables> 25 scalars are created named X0...X25.
>
> In <plugin> it loads (X25) because it could find the existing scalar and _xnum is still 25,
> then the output vectors are created with scalars starting at 25 so we have two X25.
> When I manually change initialXNum="25" in <plugin> to 26 loading works.
>
> But I'm not sure how to fix this.
> I've committed a fix (it increments _xnum before the plugin stores it).
>
> But I hope there is a more generic solution. This bug looks like a principle problem.

I think I understand the problem here: it is related to the creation
of the nameless orphan scalars which are used as numerical inputs to
plugins created in the dialog.

I will attempt to fix it.

-- 
C. Barth Netterfield
University of Toronto
416-845-0946


More information about the Kst mailing list