Bug 163925 - changeFrames(start,count,[,skip,[,ave]]) in the DataVector Class does not work properly
Summary: changeFrames(start,count,[,skip,[,ave]]) in the DataVector Class does not wor...
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: scripting (show other bugs)
Version: 1.x
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-12 18:27 UTC by Yiwen Mao
Modified: 2008-06-19 00:04 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
the source file to create the data vector (29.86 KB, text/plain)
2008-06-12 18:33 UTC, Yiwen Mao
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yiwen Mao 2008-06-12 18:27:40 UTC
Version:           1.7.0 (using KDE 4.0.1)
Installed from:    Unspecified
Compiler:          Fedora 6 
OS:                Linux

DataVectors will not be changed after applying chnageFrames(start,count)

//load a datasource file
kst> sr=new DataSource("~/graphics/kst/tests/asciimatrix.txt")
DataSource

//construct a DataVector
kst> v=new DataVector(sr,"test1",0,10)
DataVector

//view the values of v
kst> v.array
1.716299,1.716299,1.711721,1.711721,1.716299,1.716299,1.711721,1.707144,1.711721,1.711721

//apply changeFrames
kst> v.changeFrames(1,5)
undefined

//view the values of the modifed v
kst> v.array
1.716299,1.716299,1.711721,1.711721,1.716299,1.716299,1.711721,1.707144,1.711721,1.711721

v does not have any change instead of changing its number of frames to be 5 starting from the 1st frame of the original data.

//both v.frames and v.startFrame give false values after applying the method: changeFrames
kst> v.frames
0 //should be 5
kst> v.startFrame
0 //should be 1
Comment 1 Yiwen Mao 2008-06-12 18:33:14 UTC
Created attachment 25289 [details]
the source file to create the data vector
Comment 2 Andrew Walker 2008-06-13 18:47:53 UTC
This is not a problem with javaScript as much as it is with the update architecture. 

You can see the same problem by creating a data vector through the UI and then changing its frame properties. If the vector is not being used in a curve then the vector will not be updated.
Comment 3 Andrew Walker 2008-06-13 19:35:30 UTC
This problem results because there is no attempt made to update vectors in the update thread. Only curves, data objects, data sources, and scalars are updated. If one of these updated objects happens to be dependent upon a given vector, then the vector will also be updated, else it will not.
Comment 4 Andrew Walker 2008-06-19 00:04:50 UTC
SVN commit 822033 by arwalker:

BUG:163925 explicitly update the data vectors in case they are not being used in a plot

 M  +33 -5     updatethread.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=822033