Bug 164245

Summary: The inputs for the BinnedMap cannot be set properly
Product: [Applications] kst Reporter: Yiwen Mao <yiwenv>
Component: scriptingAssignee: kst
Status: RESOLVED NOT A BUG    
Severity: normal    
Priority: NOR    
Version: 1.x   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:

Description Yiwen Mao 2008-06-16 20:27:55 UTC
Version:           1.7.0 (using KDE 4.0.1)
Installed from:    Unspecified
Compiler:          Fedora 6 
OS:                Linux

//access BinnedMap object
kst> b=BinnedMap
BinnedMap

kst> v=new Vector();
Vector
kst> v.tagName="v"
v
kst> v.resize(10)
undefined
kst> for(var i=0;i<10;i++){v[i]=i+1}
10

//set up the input for the plugin
kst> b.x=v;
Vector
kst> v.y=v;
Vector
kst> v.z=v;
Vector
kst> b.xFrom=new Scalar(2);
Scalar
kst> b.xTo=new Scalar(5);
Scalar
kst> b.yFrom=new Scalar(2);
Scalar
kst> b.yTo=new Scalar(5);
Scalar
kst> b.nX=new Scalar(5);
Scalar
kst> b.nY=new Scalar(5);
Scalar
kst> b.autobin=new Scalar(0);
Scalar

//validate the plugin, but returns false
kst> b.validate()
false

//the property valid is not defined
kst> b.valid
undefined
Comment 1 Andrew Walker 2008-06-17 01:31:46 UTC
The script reads:

v.y=v;
v.z=v;

which should be:

b.y=v;
b.z=v;
Comment 2 Andrew Walker 2008-06-17 01:36:57 UTC
You also need to set the names of the outputs:

b.binnedMap="out"
b.hitsMap="hits"