[Kst] [Bug 161397] New: Executing a KstScript file does not return the expected result

Yiwen Mao yiwenv at live.ca
Tue Apr 29 02:43:07 CEST 2008

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
           Summary: Executing a KstScript file does not return the expected
           Product: kst
           Version: unspecified
          Platform: Compiled Sources
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: general
        AssignedTo: kst kde org
        ReportedBy: yiwenv live ca

Version:           1.7.0 (using KDE 3.5.8KDE 1.2)
Installed from:    0Compiled From Sources
OS:                Linux

Problem: Executing a KstScript file to construct a new DataVector and check its propety skip and skipLength, and the js file returns an unexpected result.

Procedures to reproduce the proplem:
create a js file: datavec.js

var s=new DataSource("/home/vyiwen/graphics/kst/tests/asciimatrix.txt");
function skipTest()
var result = new Boolean();
var v=new DataVector(s,"test1",0,10,0,false)//construct a new vector from data
                                            //source, and read 10 frames from                    
                                            //frame 0 and skip 0 frame   
return result;//expect result=true

Load datavec.js
Open the kst javaScript Console
Type "skipTest()"
return false

To compare with the result from executing the above script directly from JavaScript Console
Type the following codes in JavaScript Console:
kst> var s=new DataSource("/home/vyiwen/graphics/kst/tests/asciimatrix.txt");
kst> var v=new DataVector(s,"test1",0,10,0,false)
kst> if(v.skip==false&&v.skipLength==0){result=true}
kst> result

The result is true

More information about the Kst mailing list