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

Peter Kümmel syntheticpp at gmx.net
Mon Mar 21 21:40:47 CET 2011


I was too  hasty. The curve is loaded correctly but not the polynomial.

And when I save all vectors ordered kst crashes on loading this file.
But shouldn't it also work when I save all vectors this way?

Peter

On 21.03.2011 21:34, Barth Netterfield wrote:
> Very nice.  Commit!
>
> On Mon, Mar 21, 2011 at 4:05 PM, Peter Kümmel<syntheticpp at gmx.net>  wrote:
>> On 21.03.2011 20:11, Barth Netterfield wrote:
>>>
>>> Arggg...
>>> It is implemented, but doesn't work.
>>>
>>> Here is why:
>>>    The output vectors get stored in a hash.
>>>    A Hash's order is undefined.
>>>    The names of the output vectors are written in the order of the hash.
>>>    The short name numbers are allocated in the order they are created
>>>    When creating the plugin in the first case, they are created in some
>>> order at the whim of the programmer (eg, in setupOutputs).
>>>    When creating the plugin when being loaded from file, they are
>>> created in the order they were listed in the file, which is different.
>>> Mehem ensues.
>>>
>>> It is possible that save/load used to work because QHash at one time
>>> might have kept the order of creation.  Or maybe it never worked.
>>>
>>> In any case, we need to fix it:
>>> options:
>>> a) change from QHash to QMap, and change setupOutputs in all plugins
>>> so things are created alphabetically (seems fragile)
>>> b) something less fragile that I can't think of off hand.
>>>
>>> I implemented (a) for unweighted linear fits and it does work.
>>>
>>
>> What about this patch for (b) ? We don't have to touch any plugin code.
>>
>> Seems to work with the polynominal fit.
>>
>> Peter
>>
>> _______________________________________________
>> Kst mailing list
>> Kst at kde.org
>> https://mail.kde.org/mailman/listinfo/kst
>>
>>
>
>
>


More information about the Kst mailing list