diff options
author | Sunil Shetye | 2018-07-11 17:51:05 +0530 |
---|---|---|
committer | Sunil Shetye | 2018-07-12 23:01:50 +0530 |
commit | 44a3807a94783e831070f0e003340af58dc64d16 (patch) | |
tree | cce50388afa463583d7a7aead34d40f5b02281f7 /js/Sources | |
parent | 0047c3bea1d86b12a08544f6f0833c63e77f6eac (diff) | |
download | sci2js-44a3807a94783e831070f0e003340af58dc64d16.tar.gz sci2js-44a3807a94783e831070f0e003340af58dc64d16.tar.bz2 sci2js-44a3807a94783e831070f0e003340af58dc64d16.zip |
change graphics to object
Diffstat (limited to 'js/Sources')
52 files changed, 351 insertions, 299 deletions
diff --git a/js/Sources/CLKINV_f.js b/js/Sources/CLKINV_f.js index 649c7258..d86618c9 100644 --- a/js/Sources/CLKINV_f.js +++ b/js/Sources/CLKINV_f.js @@ -25,9 +25,9 @@ function CLKINV_f() { CLKINV_f.prototype.set = function CLKINV_f() { this.prt = parseFloat(arguments[0]["prt"]) this.x = arg1; - var graphics = arg1.graphics; + this.graphics = arg1.graphics; this.model = arg1.model; - var exprs = graphics.exprs; + var exprs = this.graphics.exprs; var exprs = exprs[1-1]; while (true) { [ok,this.prt,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","CLKINV_f")],[" "],["Event input port"],[" "]],"Port Number",list("vec",1),exprs); @@ -41,8 +41,8 @@ function CLKINV_f() { this.model.ipar = new ScilabDouble([this.prt]); this.model.evtout = new ScilabDouble([1]); this.model.firing = new ScilabDouble([-1]); - graphics.exprs = exprs; - this.x.graphics = graphics; + this.graphics.exprs = new ScilabDouble([exprs]); + this.x.graphics = this.graphics; this.x.model = this.model; break; } diff --git a/js/Sources/CLKINV_f.pickle b/js/Sources/CLKINV_f.pickle index bc5efd27..f8dde500 100644 --- a/js/Sources/CLKINV_f.pickle +++ b/js/Sources/CLKINV_f.pickle @@ -2,14 +2,16 @@ c__builtin__ set p0 ((lp1 -S'x' +S'prt' p2 -aS'model' +aS'x' p3 -aS'prt' +aS'model' p4 -atp5 -Rp6 +aS'graphics' +p5 +atp6 +Rp7 .(dp0 S'model.sim' p1 diff --git a/js/Sources/CLKIN_f.js b/js/Sources/CLKIN_f.js index 8dec6a6a..849ee2f2 100644 --- a/js/Sources/CLKIN_f.js +++ b/js/Sources/CLKIN_f.js @@ -24,9 +24,9 @@ function CLKIN_f() { CLKIN_f.prototype.set = function CLKIN_f() { this.prt = parseFloat(arguments[0]["prt"]) this.x = arg1; - var graphics = arg1.graphics; + this.graphics = arg1.graphics; this.model = arg1.model; - var exprs = graphics.exprs; + var exprs = this.graphics.exprs; var exprs = exprs[1-1]; while (true) { [ok,this.prt,exprs] = scicos_getvalue("Set Event Input block parameters","Port number",list("vec",1),exprs); @@ -40,8 +40,8 @@ function CLKIN_f() { this.model.ipar = new ScilabDouble([this.prt]); this.model.evtout = new ScilabDouble([1]); this.model.firing = new ScilabDouble([-1]); - graphics.exprs = exprs; - this.x.graphics = graphics; + this.graphics.exprs = new ScilabDouble([exprs]); + this.x.graphics = this.graphics; this.x.model = this.model; break; } diff --git a/js/Sources/CLKIN_f.pickle b/js/Sources/CLKIN_f.pickle index b7886c50..e733f1cb 100644 --- a/js/Sources/CLKIN_f.pickle +++ b/js/Sources/CLKIN_f.pickle @@ -2,14 +2,16 @@ c__builtin__ set p0 ((lp1 -S'x' +S'prt' p2 -aS'model' +aS'x' p3 -aS'prt' +aS'model' p4 -atp5 -Rp6 +aS'graphics' +p5 +atp6 +Rp7 .(dp0 S'model.sim' p1 diff --git a/js/Sources/CONST.js b/js/Sources/CONST.js index c6b97f93..81978c23 100644 --- a/js/Sources/CONST.js +++ b/js/Sources/CONST.js @@ -25,8 +25,8 @@ function CONST() { CONST.prototype.set = function CONST() { this.C = parseFloat(arguments[0]["C"]) this.x = arg1; - var graphics = arg1.graphics; - var exprs = graphics.exprs; + this.graphics = arg1.graphics; + var exprs = this.graphics.exprs; this.model = arg1.model; while (true) { [ok,this.C,exprs] = scicos_getvalue(["Set Contant Block"],"Constant",list("vec",-1),exprs); @@ -42,8 +42,8 @@ function CONST() { } else { this.model.rpar = new ScilabDouble(this.C.slice()); this.model.out = new ScilabDouble([nout]); - graphics.exprs = exprs; - this.x.graphics = graphics; + this.graphics.exprs = new ScilabDouble([exprs]); + this.x.graphics = this.graphics; this.x.model = this.model; break; } diff --git a/js/Sources/CONST.pickle b/js/Sources/CONST.pickle index ca6f7e0c..ed25e5f0 100644 --- a/js/Sources/CONST.pickle +++ b/js/Sources/CONST.pickle @@ -8,8 +8,10 @@ aS'model' p3 aS'C' p4 -atp5 -Rp6 +aS'graphics' +p5 +atp6 +Rp7 .(dp0 S'sz' p1 diff --git a/js/Sources/CONST_f.js b/js/Sources/CONST_f.js index 5f7bd3f7..8f809d66 100644 --- a/js/Sources/CONST_f.js +++ b/js/Sources/CONST_f.js @@ -25,8 +25,8 @@ function CONST_f() { CONST_f.prototype.set = function CONST_f() { this.C = parseFloat(arguments[0]["C"]) this.x = arg1; - var graphics = arg1.graphics; - var exprs = graphics.exprs; + this.graphics = arg1.graphics; + var exprs = this.graphics.exprs; this.model = arg1.model; while (true) { [ok,this.C,exprs] = scicos_getvalue(["Set Contant Block"],"Constant",list("vec",-1),exprs); @@ -39,8 +39,8 @@ function CONST_f() { } else { this.model.rpar = new ScilabDouble(this.C.slice()); this.model.out = new ScilabDouble([nout]); - graphics.exprs = exprs; - this.x.graphics = graphics; + this.graphics.exprs = new ScilabDouble([exprs]); + this.x.graphics = this.graphics; this.x.model = this.model; break; } diff --git a/js/Sources/CONST_f.pickle b/js/Sources/CONST_f.pickle index 153597e4..4c58ae17 100644 --- a/js/Sources/CONST_f.pickle +++ b/js/Sources/CONST_f.pickle @@ -8,8 +8,10 @@ aS'model' p3 aS'C' p4 -atp5 -Rp6 +aS'graphics' +p5 +atp6 +Rp7 .(dp0 S'model.sim' p1 diff --git a/js/Sources/CONST_m.js b/js/Sources/CONST_m.js index 3305fcd1..69e37818 100644 --- a/js/Sources/CONST_m.js +++ b/js/Sources/CONST_m.js @@ -28,8 +28,8 @@ function CONST_m() { CONST_m.prototype.set = function CONST_m() { this.C = inverse(arguments[0]["C"]) this.x = arg1; - var graphics = arg1.graphics; - var exprs = graphics.exprs; + this.graphics = arg1.graphics; + var exprs = this.graphics.exprs; this.model = arg1.model; while (true) { [ok,this.C,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","CONST_m")],[" "],["Constant value generator"],[" "]],"Constant Value",list("vec",-1),exprs); @@ -66,12 +66,12 @@ function CONST_m() { } if (ok) { this.model.rpar = new ScilabDouble([]); - var tmpvar0 = set_io(this.model,graphics,list(),list(nout,ot),[],[]) - this.model = tmpvar0[0] - var graphics = tmpvar0[1] + var tmpvar0 = set_io(this.model,this.graphics,list(),list(nout,ot),[],[]); + this.model = tmpvar0[0]; + this.graphics = tmpvar0[1]; var ok = tmpvar0[2]; - graphics.exprs = exprs; - this.x.graphics = graphics; + this.graphics.exprs = new ScilabDouble([exprs]); + this.x.graphics = this.graphics; this.x.model = this.model; break; } diff --git a/js/Sources/CONST_m.pickle b/js/Sources/CONST_m.pickle index 787cefcc..6b37f902 100644 --- a/js/Sources/CONST_m.pickle +++ b/js/Sources/CONST_m.pickle @@ -10,8 +10,10 @@ aS'type' p4 aS'C' p5 -atp6 -Rp7 +aS'graphics' +p6 +atp7 +Rp8 .(dp0 S'arg1' p1 diff --git a/js/Sources/CURVE_c.js b/js/Sources/CURVE_c.js index 7b67863e..a165bcb8 100644 --- a/js/Sources/CURVE_c.js +++ b/js/Sources/CURVE_c.js @@ -44,8 +44,8 @@ function CURVE_c() { this.graf = arguments[0]["graf"] this.x = arg1; this.model = arg1.model; - var graphics = arg1.graphics; - var exprs = graphics.exprs; + this.graphics = arg1.graphics; + var exprs = this.graphics.exprs; var ok = false; var SaveExit = false; while (true) { @@ -71,11 +71,11 @@ function CURVE_c() { if (!Ask_again) { this.xx = this.xx.slice(); this.yy = this.yy.slice(); - var tmpvar0 = size(this.xx) - var nx = tmpvar0[0] + var tmpvar0 = size(this.xx); + var nx = tmpvar0[0]; var mx = tmpvar0[1]; - var tmpvar1 = size(this.yy) - var ny = tmpvar1[0] + var tmpvar1 = size(this.yy); + var ny = tmpvar1[0]; var my = tmpvar1[1]; if (!((nx==ny)&&(mx==my))) { messagebox("Incompatible size of [x] and [y]","modal","error"); @@ -84,7 +84,7 @@ function CURVE_c() { } if (!Ask_again) { this.xy = [this.xx,this.yy]; - var tmpvar2 = cleandata(this.xy) + var tmpvar2 = cleandata(this.xy); this.xy = tmpvar2[0]; var N = size(this.xy,"r"); exprs[5-1] = "n"; @@ -96,9 +96,9 @@ function CURVE_c() { } else { this.curwin = max(winsid())+1; } - var tmpvar3 = poke_point(this.xy,ipar,rpar) - var orpar = tmpvar3[0] - var oipar = tmpvar3[1] + var tmpvar3 = poke_point(this.xy,ipar,rpar); + var orpar = tmpvar3[0]; + var oipar = tmpvar3[1]; var ok = tmpvar3[2]; if (!ok) { break; @@ -130,9 +130,9 @@ function CURVE_c() { exprs[4-1] = perop; var SaveExit = true; } else { - var tmpvar4 = Do_Spline(N,mtd,this.xy.slice()[1-1],this.xy.slice()[2-1]) - var Xdummy = tmpvar4[0] - var Ydummy = tmpvar4[1] + var tmpvar4 = Do_Spline(N,mtd,this.xy.slice()[1-1],this.xy.slice()[2-1]); + var Xdummy = tmpvar4[0]; + var Ydummy = tmpvar4[1]; var orpar = tmpvar4[2]; if ((METHOD=="periodic")) { this.xy[N-1][2-1] = this.xy[1-1][2-1]; @@ -158,9 +158,9 @@ function CURVE_c() { } this.model.rpar = new ScilabDouble(orpar); this.model.ipar = new ScilabDouble(oipar); - graphics.exprs = exprs; + this.graphics.exprs = new ScilabDouble([exprs]); this.x.model = this.model; - this.x.graphics = graphics; + this.x.graphics = this.graphics; break; } } diff --git a/js/Sources/CURVE_c.pickle b/js/Sources/CURVE_c.pickle index 8aca82e4..19b20933 100644 --- a/js/Sources/CURVE_c.pickle +++ b/js/Sources/CURVE_c.pickle @@ -10,7 +10,7 @@ aS'inrpar' p4 aS'sok' p5 -aS'offset' +aS'graphics' p6 aS'Pd3' p7 @@ -60,7 +60,7 @@ aS'sAmp2' p29 aS'zok' p30 -aS'iipar' +aS'offset' p31 aS'yt' p32 @@ -108,42 +108,44 @@ aS'wp' p53 aS'phase' p54 -aS'min5' +aS'iipar' p55 -aS'mok' +aS'min5' p56 -aS'Pw3' +aS'mok' p57 -aS'sheetN' +aS'Pw3' p58 -aS'xgetmouse' +aS'sheetN' p59 -aS'max5' +aS'xgetmouse' p60 -aS'rparin' +aS'max5' p61 -aS'sample4' +aS'rparin' p62 -aS'Cy' +aS'sample4' p63 -aS'sTp2' +aS'Cy' p64 -aS'yy' +aS'sTp2' p65 -aS'x' +aS'yy' p66 -aS'model' +aS'x' p67 -aS'ORDER2' +aS'model' p68 -aS'irpar' +aS'ORDER2' p69 -aS'graf' +aS'irpar' p70 -aS'xye' +aS'graf' p71 -atp72 -Rp73 +aS'xye' +p72 +atp73 +Rp74 .(dp0 S'mean4' p1 diff --git a/js/Sources/CURV_f.js b/js/Sources/CURV_f.js index 17889b60..e34977ec 100644 --- a/js/Sources/CURV_f.js +++ b/js/Sources/CURV_f.js @@ -30,7 +30,7 @@ function CURV_f() { CURV_f.prototype.set = function CURV_f() { this.x = arg1; this.model = arg1.model; - var graphics = arg1.graphics; + this.graphics = arg1.graphics; var rpar = this.model.rpar; var ipar = this.model.ipar; var n = ipar[1-1]; @@ -40,10 +40,10 @@ function CURV_f() { while (true) { [ln,fun]=where() if (!or(fun=="do_eval")) { - var tmpvar0 = edit_curv(xx,yy,"axy",[" "," "," "],gc) - var xx = tmpvar0[0] - var yy = tmpvar0[1] - var ok = tmpvar0[2] + var tmpvar0 = edit_curv(xx,yy,"axy",[" "," "," "],gc); + var xx = tmpvar0[0]; + var yy = tmpvar0[1]; + var ok = tmpvar0[2]; var gc = tmpvar0[3]; } else { var ok = true; @@ -63,7 +63,7 @@ function CURV_f() { this.model.rpar = new ScilabDouble([xx.slice()],[yy.slice()],[rect.slice()]); var axisdata = gc[2-1]; this.model.ipar = new ScilabDouble([size(xx,"*")],[axisdata.slice()]); - this.x.graphics = graphics; + this.x.graphics = this.graphics; this.x.model = this.model; break; } diff --git a/js/Sources/CURV_f.pickle b/js/Sources/CURV_f.pickle index cd8f09a6..d4d844a0 100644 --- a/js/Sources/CURV_f.pickle +++ b/js/Sources/CURV_f.pickle @@ -6,8 +6,10 @@ S'x' p2 aS'model' p3 -atp4 -Rp5 +aS'graphics' +p4 +atp5 +Rp6 .(dp0 S'arg1' p1 diff --git a/js/Sources/Counter.js b/js/Sources/Counter.js index d9461533..6b5c835b 100644 --- a/js/Sources/Counter.js +++ b/js/Sources/Counter.js @@ -34,8 +34,8 @@ function Counter() { this.maxim = parseFloat(arguments[0]["maxim"]) this.rule = parseFloat(arguments[0]["rule"]) this.x = arg1; - var graphics = arg1.graphics; - var exprs = graphics.exprs; + this.graphics = arg1.graphics; + var exprs = this.graphics.exprs; this.model = arg1.model; while (true) { [ok,this.minim,this.maxim,this.rule,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","Counter")],[" "],["Integer counter generator"],[" "]],["Minimum","Maximum","Rule (1:Increment, 2:Decrement)"],list("vec",1,"vec",1,"vec",1),exprs); @@ -49,10 +49,10 @@ function Counter() { } else if ((this.rule!=1&&this.rule!=2)) { block_parameter_error(msprintf("Wrong value for \'Rule\' parameter: %d",this.rule),msprintf("Must be in the interval %s.","[1,2]")); } else { - graphics.exprs = exprs; + this.graphics.exprs = new ScilabDouble([exprs]); this.model.dstate = new ScilabDouble([0]); this.model.ipar = new ScilabDouble([this.rule],[this.maxim],[this.minim]); - this.x.graphics = graphics; + this.x.graphics = this.graphics; this.x.model = this.model; break; } diff --git a/js/Sources/Counter.pickle b/js/Sources/Counter.pickle index c377d262..eabc335f 100644 --- a/js/Sources/Counter.pickle +++ b/js/Sources/Counter.pickle @@ -2,18 +2,20 @@ c__builtin__ set p0 ((lp1 -S'x' +S'minim' p2 -aS'model' -p3 aS'maxim' -p4 +p3 aS'rule' +p4 +aS'graphics' p5 -aS'minim' +aS'x' p6 -atp7 -Rp8 +aS'model' +p7 +atp8 +Rp9 .(dp0 S'model.dstate' p1 diff --git a/js/Sources/FROMWS_c.js b/js/Sources/FROMWS_c.js index 5cf355cb..678deb94 100644 --- a/js/Sources/FROMWS_c.js +++ b/js/Sources/FROMWS_c.js @@ -39,8 +39,8 @@ function FROMWS_c() { this.ZC = parseFloat(arguments[0]["ZC"]) this.OutEnd = parseFloat(arguments[0]["OutEnd"]) this.x = arg1; - var graphics = arg1.graphics; - var exprs = graphics.exprs; + this.graphics = arg1.graphics; + var exprs = this.graphics.exprs; this.model = arg1.model; while (true) { [ok,this.varnam,this.Method,this.ZC,this.OutEnd,exprs] = scicos_getvalue("Set From_Workspace block parameters",["Variable name","Interpolation Method","Enable zero crossing(0:No, 1:Yes)?","Output at end(0:Zero, 1:Hold, 2:Repeat)"],list("str",1,"vec",1,"vec",1,"vec",1),exprs); @@ -67,13 +67,13 @@ function FROMWS_c() { } if (ok) { this.model.ipar = new ScilabDouble([length(this.varnam)],[this._str2code[this.varnam-1]],[this.Method],[this.ZC],[this.OutEnd]); - var tmpvar0 = set_io(this.model,graphics,list(),list([-1,-2],-1),1,1) - this.model = tmpvar0[0] - var graphics = tmpvar0[1] + var tmpvar0 = set_io(this.model,this.graphics,list(),list([-1,-2],-1),1,1); + this.model = tmpvar0[0]; + this.graphics = tmpvar0[1]; var ok = tmpvar0[2]; if (ok) { - graphics.exprs = exprs; - this.x.graphics = graphics; + this.graphics.exprs = new ScilabDouble([exprs]); + this.x.graphics = this.graphics; this.x.model = this.model; break; } diff --git a/js/Sources/FROMWS_c.pickle b/js/Sources/FROMWS_c.pickle index ecf91390..e3017752 100644 --- a/js/Sources/FROMWS_c.pickle +++ b/js/Sources/FROMWS_c.pickle @@ -8,16 +8,18 @@ aS'ZC' p3 aS'OutEnd' p4 -aS'x' +aS'graphics' p5 -aS'model' +aS'x' p6 -aS'Method' +aS'model' p7 -aS'varnam' +aS'Method' p8 -atp9 -Rp10 +aS'varnam' +p9 +atp10 +Rp11 .(dp0 S'arg1' p1 diff --git a/js/Sources/GENSIN_f.js b/js/Sources/GENSIN_f.js index ed9ffb75..5871d300 100644 --- a/js/Sources/GENSIN_f.js +++ b/js/Sources/GENSIN_f.js @@ -32,8 +32,8 @@ function GENSIN_f() { this.F = arguments[0]["F"] this.P = arguments[0]["P"] this.x = arg1; - var graphics = arg1.graphics; - var exprs = graphics.exprs; + this.graphics = arg1.graphics; + var exprs = this.graphics.exprs; this.model = arg1.model; while (true) { [ok,this.M,this.F,this.P,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","GENSIN_f")],[" "],["Sine wave generator"],[" "]],["Magnitude","Frequency (rad/s)","Phase (rad)"],list("vec",1,"vec",1,"vec",1),exprs); @@ -45,15 +45,15 @@ function GENSIN_f() { var ok = false; } if (ok) { - var tmpvar0 = check_io(this.model,graphics,[],1,[],[]) - this.model = tmpvar0[0] - var graphics = tmpvar0[1] + var tmpvar0 = check_io(this.model,this.graphics,[],1,[],[]); + this.model = tmpvar0[0]; + this.graphics = tmpvar0[1]; var ok = tmpvar0[2]; this.model.rpar = new ScilabDouble([this.M],[this.F],[this.P]); this.model.out2 = new ScilabDouble([1]); this.model.outtyp = new ScilabDouble([1]); - graphics.exprs = exprs; - this.x.graphics = graphics; + this.graphics.exprs = new ScilabDouble([exprs]); + this.x.graphics = this.graphics; this.x.model = this.model; break; } diff --git a/js/Sources/GENSIN_f.pickle b/js/Sources/GENSIN_f.pickle index 8787f4b9..2058c781 100644 --- a/js/Sources/GENSIN_f.pickle +++ b/js/Sources/GENSIN_f.pickle @@ -2,18 +2,20 @@ c__builtin__ set p0 ((lp1 -S'x' +S'F' p2 -aS'model' -p3 aS'M' -p4 +p3 aS'P' +p4 +aS'graphics' p5 -aS'F' +aS'x' p6 -atp7 -Rp8 +aS'model' +p7 +atp8 +Rp9 .(dp0 S'model.sim' p1 diff --git a/js/Sources/GENSQR_f.js b/js/Sources/GENSQR_f.js index 83d9d48c..9d5be45d 100644 --- a/js/Sources/GENSQR_f.js +++ b/js/Sources/GENSQR_f.js @@ -28,8 +28,8 @@ function GENSQR_f() { GENSQR_f.prototype.set = function GENSQR_f() { this.Amplitude = parseFloat(arguments[0]["Amplitude"]) this.x = arg1; - var graphics = arg1.graphics; - var exprs = graphics.exprs; + this.graphics = arg1.graphics; + var exprs = this.graphics.exprs; this.model = arg1.model; if (size(exprs,"*")==2) { var exprs = exprs[2-1]; @@ -39,11 +39,11 @@ function GENSQR_f() { if (!ok) { break; } - graphics.exprs = exprs; + this.graphics.exprs = new ScilabDouble([exprs]); this.model.dstate = new ScilabDouble([this.Amplitude]); this.model.out2 = new ScilabDouble([1]); this.model.outtyp = new ScilabDouble([1]); - this.x.graphics = graphics; + this.x.graphics = this.graphics; this.x.model = this.model; break; } diff --git a/js/Sources/GENSQR_f.pickle b/js/Sources/GENSQR_f.pickle index b43e515b..b2ee098e 100644 --- a/js/Sources/GENSQR_f.pickle +++ b/js/Sources/GENSQR_f.pickle @@ -8,8 +8,10 @@ aS'model' p3 aS'Amplitude' p4 -atp5 -Rp6 +aS'graphics' +p5 +atp6 +Rp7 .(dp0 S'model.sim' p1 diff --git a/js/Sources/GEN_SQR.js b/js/Sources/GEN_SQR.js index 17d47993..e6ba542c 100644 --- a/js/Sources/GEN_SQR.js +++ b/js/Sources/GEN_SQR.js @@ -66,8 +66,8 @@ function GEN_SQR() { var y = this.needcompile; arg1.model.ipar = 1; var typ = list(); - var graphics = arg1.graphics; - var exprs = graphics.exprs; + this.graphics = arg1.graphics; + var exprs = this.graphics.exprs; var Btitre = "Set GEN_SQR parameters"; var Exprs0 = [["Amin"],["Amax"],["rule"],["F"]]; var Bitems = [["Minimum Value"],["Maximum Value"],["Initial Value( 1= Minimum Value 2= Maximum Value)"],["Period (sec)"]]; @@ -82,14 +82,14 @@ function GEN_SQR() { } var PREVAR_scicos_context = scicos_context; var sblock = this.x.model.rpar; - var tmpvar0 = script2var(sblock.props.context,PREVAR_scicos_context) - var PREVAR_scicos_context = tmpvar0[0] + var tmpvar0 = script2var(sblock.props.context,PREVAR_scicos_context); + var PREVAR_scicos_context = tmpvar0[0]; var ierr = tmpvar0[1]; if (ierr==0) { - var tmpvar1 = do_eval(sblock,list()) - var sblock = tmpvar1[0] - %w = tmpvar1[1] - var needcompile2 = tmpvar1[2] + var tmpvar1 = do_eval(sblock,list()); + var sblock = tmpvar1[0]; + %w = tmpvar1[1]; + var needcompile2 = tmpvar1[2]; var ok = tmpvar1[3]; if (ok) { var y = max(2,this.needcompile,needcompile2); diff --git a/js/Sources/GEN_SQR.pickle b/js/Sources/GEN_SQR.pickle index 742ed299..2f6fdb8a 100644 --- a/js/Sources/GEN_SQR.pickle +++ b/js/Sources/GEN_SQR.pickle @@ -8,16 +8,18 @@ aS'scicos_context.Amax' p3 aS'scicos_context.rule' p4 -aS'x' +aS'graphics' p5 -aS'scicos_context.Amin' +aS'x' p6 -aS'scicos_context.F' +aS'scicos_context.Amin' p7 -aS'model' +aS'scicos_context.F' p8 -atp9 -Rp10 +aS'model' +p9 +atp10 +Rp11 .(dp0 S'model.odstate' p1 diff --git a/js/Sources/INIMPL_f.js b/js/Sources/INIMPL_f.js index a74a358e..158e9b71 100644 --- a/js/Sources/INIMPL_f.js +++ b/js/Sources/INIMPL_f.js @@ -30,8 +30,8 @@ function INIMPL_f() { INIMPL_f.prototype.set = function INIMPL_f() { this.prt = parseFloat(arguments[0]["prt"]) this.x = arg1; - var graphics = arg1.graphics; - var exprs = graphics.exprs; + this.graphics = arg1.graphics; + var exprs = this.graphics.exprs; this.model = arg1.model; if (size(exprs,"*")==2) { var exprs = exprs[1-1]; @@ -50,8 +50,8 @@ function INIMPL_f() { var y = needcompile; } this.model.ipar = new ScilabDouble([this.prt]); - graphics.exprs = exprs; - this.x.graphics = graphics; + this.graphics.exprs = new ScilabDouble([exprs]); + this.x.graphics = this.graphics; this.x.model = this.model; break; } diff --git a/js/Sources/INIMPL_f.pickle b/js/Sources/INIMPL_f.pickle index a715bfa6..7a3db6b1 100644 --- a/js/Sources/INIMPL_f.pickle +++ b/js/Sources/INIMPL_f.pickle @@ -2,14 +2,16 @@ c__builtin__ set p0 ((lp1 -S'x' +S'prt' p2 -aS'model' +aS'x' p3 -aS'prt' +aS'model' p4 -atp5 -Rp6 +aS'graphics' +p5 +atp6 +Rp7 .(dp0 S'arg1' p1 diff --git a/js/Sources/IN_f.js b/js/Sources/IN_f.js index 35db0c40..756cf5cd 100644 --- a/js/Sources/IN_f.js +++ b/js/Sources/IN_f.js @@ -25,9 +25,9 @@ function IN_f() { } IN_f.prototype.set = function IN_f() { this.x = arg1; - var graphics = arg1.graphics; + this.graphics = arg1.graphics; this.model = arg1.model; - var exprs = graphics.exprs; + var exprs = this.graphics.exprs; if (size(exprs,"*")==2) { var exprs = exprs[1-1]; } @@ -35,11 +35,11 @@ function IN_f() { var exprs = [[exprs[1-1]],["[-1 -2]"],["-1"]]; } while (true) { - var tmpvar0 = getvalue(_("Set Input block parameters"),[[_("Port number")],[_("Outport size ([-1 -2] for inherit)")],[_("Outport Type (-1 for inherit)")]],list("vec",1,"vec",-1,"vec",1),exprs) - var ok = tmpvar0[0] - var prt = tmpvar0[1] - var otsz = tmpvar0[2] - var ot = tmpvar0[3] + var tmpvar0 = getvalue(_("Set Input block parameters"),[[_("Port number")],[_("Outport size ([-1 -2] for inherit)")],[_("Outport Type (-1 for inherit)")]],list("vec",1,"vec",-1,"vec",1),exprs); + var ok = tmpvar0[0]; + var prt = tmpvar0[1]; + var otsz = tmpvar0[2]; + var ot = tmpvar0[3]; var exprs = tmpvar0[4]; if (!ok) { break; @@ -61,8 +61,8 @@ function IN_f() { this.model.out = new ScilabDouble([otsz[1-1]]); this.model.out2 = new ScilabDouble([otsz[2-1]]); this.model.outtyp = new ScilabDouble([ot]); - graphics.exprs = exprs; - this.x.graphics = graphics; + this.graphics.exprs = new ScilabDouble(exprs); + this.x.graphics = this.graphics; this.x.model = this.model; break; } diff --git a/js/Sources/IN_f.pickle b/js/Sources/IN_f.pickle index 71f9181e..3594fa55 100644 --- a/js/Sources/IN_f.pickle +++ b/js/Sources/IN_f.pickle @@ -6,8 +6,10 @@ S'x' p2 aS'model' p3 -atp4 -Rp5 +aS'graphics' +p4 +atp5 +Rp6 .(dp0 S'needcompile' p1 diff --git a/js/Sources/Modulo_Count.js b/js/Sources/Modulo_Count.js index fd47a64a..2ac3c14f 100644 --- a/js/Sources/Modulo_Count.js +++ b/js/Sources/Modulo_Count.js @@ -30,8 +30,8 @@ function Modulo_Count() { this.ini_c = parseFloat(arguments[0]["ini_c"]) this.base = parseFloat(arguments[0]["base"]) this.x = arg1; - var graphics = arg1.graphics; - var exprs = graphics.exprs; + this.graphics = arg1.graphics; + var exprs = this.graphics.exprs; this.model = arg1.model; while (true) { [ok,this.ini_c,this.base,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","Modulo_Count")],[" "],["Modulo counter (0 to N counter)"],[" "]],["Initial State (zero or positive number)","Upper Limit (positive number)"],list("vec",1,"vec",1),exprs); @@ -45,10 +45,10 @@ function Modulo_Count() { } else if (this.base<=0) { block_parameter_error(msprintf("Wrong values for \'Upper Limit\' parameter: %d.",this.base),"Strictly positive integer expected."); } else { - graphics.exprs = exprs; + this.graphics.exprs = new ScilabDouble([exprs]); this.model.ipar = new ScilabDouble([this.base]); this.model.dstate = new ScilabDouble([this.ini_c]); - this.x.graphics = graphics; + this.x.graphics = this.graphics; this.x.model = this.model; break; } diff --git a/js/Sources/Modulo_Count.pickle b/js/Sources/Modulo_Count.pickle index b0b58fd4..5f0e8a6d 100644 --- a/js/Sources/Modulo_Count.pickle +++ b/js/Sources/Modulo_Count.pickle @@ -6,12 +6,14 @@ S'x' p2 aS'model' p3 -aS'base' -p4 aS'ini_c' +p4 +aS'base' p5 -atp6 -Rp7 +aS'graphics' +p6 +atp7 +Rp8 .(dp0 S'model.sim' p1 diff --git a/js/Sources/PULSE_SC.js b/js/Sources/PULSE_SC.js index 5d571066..802851d4 100644 --- a/js/Sources/PULSE_SC.js +++ b/js/Sources/PULSE_SC.js @@ -61,8 +61,8 @@ function PULSE_SC() { var y = this.needcompile; arg1.model.ipar = 1; var typ = list(); - var graphics = arg1.graphics; - var exprs = graphics.exprs; + this.graphics = arg1.graphics; + var exprs = this.graphics.exprs; var Btitre = "Set Pulse Generator parameters"; var Exprs0 = [["E"],["W"],["F"],["A"]]; var Bitems = [["Phase delay (secs):"],["Pulse Width (% of period):"],["Period (secs):"],["Amplitude:"]]; @@ -77,14 +77,14 @@ function PULSE_SC() { } var PREVAR_scicos_context = scicos_context; var sblock = this.x.model.rpar; - var tmpvar0 = script2var(sblock.props.context,PREVAR_scicos_context) - var PREVAR_scicos_context = tmpvar0[0] + var tmpvar0 = script2var(sblock.props.context,PREVAR_scicos_context); + var PREVAR_scicos_context = tmpvar0[0]; var ierr = tmpvar0[1]; if (ierr==0) { - var tmpvar1 = do_eval(sblock,list()) - var sblock = tmpvar1[0] - %w = tmpvar1[1] - var needcompile2 = tmpvar1[2] + var tmpvar1 = do_eval(sblock,list()); + var sblock = tmpvar1[0]; + %w = tmpvar1[1]; + var needcompile2 = tmpvar1[2]; var ok = tmpvar1[3]; if (ok) { var y = max(2,this.needcompile,needcompile2); diff --git a/js/Sources/PULSE_SC.pickle b/js/Sources/PULSE_SC.pickle index 8e427edb..40948305 100644 --- a/js/Sources/PULSE_SC.pickle +++ b/js/Sources/PULSE_SC.pickle @@ -6,18 +6,20 @@ S'needcompile' p2 aS'scicos_context.W' p3 -aS'x' +aS'graphics' p4 -aS'model' +aS'x' p5 -aS'scicos_context.A' +aS'model' p6 -aS'scicos_context.F' +aS'scicos_context.A' p7 -aS'scicos_context.E' +aS'scicos_context.F' p8 -atp9 -Rp10 +aS'scicos_context.E' +p9 +atp10 +Rp11 .(dp0 S'model.odstate' p1 diff --git a/js/Sources/RAMP.js b/js/Sources/RAMP.js index 25aa112e..828bed9d 100644 --- a/js/Sources/RAMP.js +++ b/js/Sources/RAMP.js @@ -35,8 +35,8 @@ function RAMP() { this.stt = parseFloat(arguments[0]["stt"]) this.iout = parseFloat(arguments[0]["iout"]) this.x = arg1; - var graphics = arg1.graphics; - var exprs = graphics.exprs; + this.graphics = arg1.graphics; + var exprs = this.graphics.exprs; this.model = arg1.model; while (true) { [ok,this.slope,this.stt,this.iout,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","RAMP")],[" "],["Ramp function"],[" "]],["Slope","Start Time","Initial Value"],list("vec",1,"vec",1,"vec",1),exprs); @@ -47,8 +47,8 @@ function RAMP() { block_parameter_error(msprintf("Wrong value for \'Start Time\' parameter: %e.",this.stt),"Null or positive integer expected."); } else { this.model.rpar = new ScilabDouble([this.slope],[this.stt],[this.iout]); - graphics.exprs = exprs; - this.x.graphics = graphics; + this.graphics.exprs = new ScilabDouble([exprs]); + this.x.graphics = this.graphics; this.x.model = this.model; break; } diff --git a/js/Sources/RAMP.pickle b/js/Sources/RAMP.pickle index 7dbb0ae5..90ce1880 100644 --- a/js/Sources/RAMP.pickle +++ b/js/Sources/RAMP.pickle @@ -4,16 +4,18 @@ p0 ((lp1 S'slope' p2 -aS'x' +aS'iout' p3 -aS'model' +aS'stt' p4 -aS'iout' +aS'graphics' p5 -aS'stt' +aS'x' p6 -atp7 -Rp8 +aS'model' +p7 +atp8 +Rp9 .(dp0 S'slope' p1 diff --git a/js/Sources/RAND_f.js b/js/Sources/RAND_f.js index ec4d7b4c..8799018e 100644 --- a/js/Sources/RAND_f.js +++ b/js/Sources/RAND_f.js @@ -38,8 +38,8 @@ function RAND_f() { this.b = parseFloat(arguments[0]["b"]) this.seed_c = arguments[0]["seed_c"] this.x = arg1; - var graphics = arg1.graphics; - var exprs = graphics.exprs; + this.graphics = arg1.graphics; + var exprs = this.graphics.exprs; this.model = arg1.model; if (size(exprs,"*")==5) { var exprs = exprs.slice(1-1,3); @@ -56,12 +56,12 @@ function RAND_f() { message("flag must be equal to 1 or 0"); } else { var nout = size(this.a,"*"); - graphics.exprs = exprs; + this.graphics.exprs = new ScilabDouble(exprs); this.model.out = new ScilabDouble([nout]); this.model.ipar = new ScilabDouble([this.flag]); this.model.rpar = new ScilabDouble([this.a.slice()],[this.b.slice()]); this.model.dstate = new ScilabDouble([this.seed_c],[0*this.a.slice()]); - this.x.graphics = graphics; + this.x.graphics = this.graphics; this.x.model = this.model; break; } diff --git a/js/Sources/RAND_f.pickle b/js/Sources/RAND_f.pickle index 984969db..3810200f 100644 --- a/js/Sources/RAND_f.pickle +++ b/js/Sources/RAND_f.pickle @@ -10,12 +10,14 @@ aS'seed_c' p4 aS'flag' p5 -aS'x' +aS'graphics' p6 -aS'model' +aS'x' p7 -atp8 -Rp9 +aS'model' +p8 +atp9 +Rp10 .(dp0 S'model.dstate' p1 diff --git a/js/Sources/RAND_m.js b/js/Sources/RAND_m.js index f25eacce..ff748381 100644 --- a/js/Sources/RAND_m.js +++ b/js/Sources/RAND_m.js @@ -49,8 +49,8 @@ function RAND_m() { this.b = parseFloat(arguments[0]["b"]) this.seed_c = arguments[0]["seed_c"] this.x = arg1; - var graphics = arg1.graphics; - var exprs = graphics.exprs; + this.graphics = arg1.graphics; + var exprs = this.graphics.exprs; this.model = arg1.model; if (size(exprs,"*")==14) { exprs[9-1] = []; @@ -79,15 +79,15 @@ function RAND_m() { var ok = false; } if (ok) { - var tmpvar0 = set_io(this.model,graphics,list([],[]),list(out,ot),1,[]) - this.model = tmpvar0[0] - var graphics = tmpvar0[1] + var tmpvar0 = set_io(this.model,this.graphics,list([],[]),list(out,ot),1,[]); + this.model = tmpvar0[0]; + this.graphics = tmpvar0[1]; var ok = tmpvar0[2]; if (ok) { this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([4])); - graphics.exprs = exprs; + this.graphics.exprs = new ScilabDouble([exprs]); this.model.ipar = new ScilabDouble([this.flag]); - this.x.graphics = graphics; + this.x.graphics = this.graphics; this.x.model = this.model; break; } diff --git a/js/Sources/RAND_m.pickle b/js/Sources/RAND_m.pickle index 530befda..06b6608f 100644 --- a/js/Sources/RAND_m.pickle +++ b/js/Sources/RAND_m.pickle @@ -10,14 +10,16 @@ aS'seed_c' p4 aS'flag' p5 -aS'x' +aS'graphics' p6 -aS'model' +aS'x' p7 -aS'typ' +aS'model' p8 -atp9 -Rp10 +aS'typ' +p9 +atp10 +Rp11 .(dp0 S'model.dstate' p1 diff --git a/js/Sources/READAU_f.js b/js/Sources/READAU_f.js index efd42ea1..c3db2463 100644 --- a/js/Sources/READAU_f.js +++ b/js/Sources/READAU_f.js @@ -41,8 +41,8 @@ function READAU_f() { this.N = parseFloat(arguments[0]["N"]) this.swap = parseFloat(arguments[0]["swap"]) this.x = arg1; - var graphics = arg1.graphics; - var exprs = graphics.exprs; + this.graphics = arg1.graphics; + var exprs = this.graphics.exprs; this.model = arg1.model; var out = this.model.out; var dstate = this.model.dstate; @@ -74,9 +74,9 @@ function READAU_f() { } else if (this.swap!=0&&this.swap!=1) { block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Swap Mode",this.swap),msprintf("Must be in the interval %s.","[0, 1]")); } else { - var tmpvar0 = check_io(this.model,graphics,[],1,1,[]) - this.model = tmpvar0[0] - var graphics = tmpvar0[1] + var tmpvar0 = check_io(this.model,this.graphics,[],1,1,[]); + this.model = tmpvar0[0]; + this.graphics = tmpvar0[1]; var ok = tmpvar0[2]; var frmt1 = part(frmt1,1,3); if (ok) { @@ -86,8 +86,8 @@ function READAU_f() { } this.model.dstate = new ScilabDouble(dstate); this.model.ipar = new ScilabDouble(ipar); - graphics.exprs = exprs; - this.x.graphics = graphics; + this.graphics.exprs = new ScilabDouble([exprs]); + this.x.graphics = this.graphics; this.x.model = this.model; break; } diff --git a/js/Sources/READAU_f.pickle b/js/Sources/READAU_f.pickle index aef1d2b2..c112ea3e 100644 --- a/js/Sources/READAU_f.pickle +++ b/js/Sources/READAU_f.pickle @@ -8,16 +8,18 @@ aS'fname1' p3 aS'N' p4 -aS'alreadyran' +aS'swap' p5 -aS'x' +aS'graphics' p6 -aS'model' +aS'x' p7 -aS'swap' +aS'model' p8 -atp9 -Rp10 +aS'alreadyran' +p9 +atp10 +Rp11 .(dp0 S'tmask' p1 diff --git a/js/Sources/READC_f.js b/js/Sources/READC_f.js index 9dc47d51..2f818f23 100644 --- a/js/Sources/READC_f.js +++ b/js/Sources/READC_f.js @@ -56,8 +56,8 @@ function READC_f() { this.swap = parseFloat(arguments[0]["swap"]) this.x = arg1; this.model = this.x.model; - var graphics = arg1.graphics; - var exprs = graphics.exprs; + this.graphics = arg1.graphics; + var exprs = this.graphics.exprs; var out = this.model.out; var dstate = this.model.dstate; var ipar = this.model.ipar; @@ -113,9 +113,9 @@ function READC_f() { var outpt = 1; } var out = size(this.outmask,"*"); - var tmpvar0 = check_io(this.model,graphics,[],out,1,outpt) - this.model = tmpvar0[0] - var graphics = tmpvar0[1] + var tmpvar0 = check_io(this.model,this.graphics,[],out,1,outpt); + this.model = tmpvar0[0]; + this.graphics = tmpvar0[1]; var ok = tmpvar0[2]; this.frmt1 = part(this.frmt1,1,3); if (ok) { @@ -130,8 +130,8 @@ function READC_f() { } this.model.dstate = new ScilabDouble(dstate); this.model.ipar = new ScilabDouble(ipar); - graphics.exprs = exprs; - this.x.graphics = graphics; + this.graphics.exprs = new ScilabDouble([exprs]); + this.x.graphics = this.graphics; this.x.model = this.model; break; } diff --git a/js/Sources/READC_f.pickle b/js/Sources/READC_f.pickle index 4656e4f2..635dc478 100644 --- a/js/Sources/READC_f.pickle +++ b/js/Sources/READC_f.pickle @@ -18,16 +18,18 @@ aS'swap' p8 aS'offset' p9 -aS'x' +aS'graphics' p10 -aS'model' +aS'x' p11 -aS'tmask1' +aS'model' p12 -aS'alreadyran' +aS'tmask1' p13 -atp14 -Rp15 +aS'alreadyran' +p14 +atp15 +Rp16 .(dp0 S'tmask' p1 diff --git a/js/Sources/RFILE_f.js b/js/Sources/RFILE_f.js index 5f94def6..778ebced 100644 --- a/js/Sources/RFILE_f.js +++ b/js/Sources/RFILE_f.js @@ -45,8 +45,8 @@ function RFILE_f() { this.frmt1 = parseFloat(arguments[0]["frmt1"]) this.N = parseFloat(arguments[0]["N"]) this.x = arg1; - var graphics = arg1.graphics; - var exprs = graphics.exprs; + this.graphics = arg1.graphics; + var exprs = this.graphics.exprs; this.model = arg1.model; var dstate = this.model.dstate; var ipar = this.model.ipar; @@ -97,9 +97,9 @@ function RFILE_f() { var ievt = 1; var cout = 1; } - var tmpvar0 = check_io(this.model,graphics,[],nout,1,cout) - this.model = tmpvar0[0] - var graphics = tmpvar0[1] + var tmpvar0 = check_io(this.model,this.graphics,[],nout,1,cout); + this.model = tmpvar0[0]; + this.graphics = tmpvar0[1]; var ok = tmpvar0[2]; if (ok) { if (ievt==0) { @@ -113,8 +113,8 @@ function RFILE_f() { } this.model.dstate = new ScilabDouble(dstate); this.model.ipar = new ScilabDouble(ipar); - graphics.exprs = exprs; - this.x.graphics = graphics; + this.graphics.exprs = new ScilabDouble([exprs]); + this.x.graphics = this.graphics; this.x.model = this.model; break; } diff --git a/js/Sources/RFILE_f.pickle b/js/Sources/RFILE_f.pickle index d07126d0..8be76902 100644 --- a/js/Sources/RFILE_f.pickle +++ b/js/Sources/RFILE_f.pickle @@ -12,14 +12,16 @@ aS'fname1' p5 aS'N' p6 -aS'x' +aS'graphics' p7 -aS'model' +aS'x' p8 -aS'tmask1' +aS'model' p9 -atp10 -Rp11 +aS'tmask1' +p10 +atp11 +Rp12 .(dp0 S'tmask' p1 diff --git a/js/Sources/STEP.js b/js/Sources/STEP.js index 0ff3980a..10babc97 100644 --- a/js/Sources/STEP.js +++ b/js/Sources/STEP.js @@ -34,8 +34,8 @@ function STEP() { this.in1 = arguments[0]["in1"] this.fi = arguments[0]["fi"] this.x = arg1; - var graphics = arg1.graphics; - var exprs = graphics.exprs; + this.graphics = arg1.graphics; + var exprs = this.graphics.exprs; this.model = arg1.model; while (true) { [ok,this.temps,this.in1,this.fi,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","STEP_FUNCTION")],[" "],["Step Function"],[" "]],["Step Time","Initial Value","Final Value"],list("vec",1,"vec",-1,"vec",-1),exprs); @@ -57,9 +57,9 @@ function STEP() { if (ok) { this.model.out2 = new ScilabDouble([1]); this.model.outtyp = new ScilabDouble([1]); - var tmpvar0 = check_io(this.model,graphics,[],size(this.fi,"*"),1,1) - this.model = tmpvar0[0] - var graphics = tmpvar0[1] + var tmpvar0 = check_io(this.model,this.graphics,[],size(this.fi,"*"),1,1); + this.model = tmpvar0[0]; + this.graphics = tmpvar0[1]; var ok = tmpvar0[2]; } if (ok) { @@ -70,8 +70,8 @@ function STEP() { var rpar = [[this.in1],[this.fi]]; } this.model.rpar = new ScilabDouble(rpar); - graphics.exprs = exprs; - this.x.graphics = graphics; + this.graphics.exprs = new ScilabDouble([exprs]); + this.x.graphics = this.graphics; this.x.model = this.model; break; } diff --git a/js/Sources/STEP.pickle b/js/Sources/STEP.pickle index e025ae99..e49533dc 100644 --- a/js/Sources/STEP.pickle +++ b/js/Sources/STEP.pickle @@ -2,18 +2,20 @@ c__builtin__ set p0 ((lp1 -S'temps' +S'graphics' p2 -aS'x' +aS'in1' p3 -aS'model' +aS'temps' p4 -aS'in1' -p5 aS'fi' +p5 +aS'x' p6 -atp7 -Rp8 +aS'model' +p7 +atp8 +Rp9 .(dp0 S'arg1' p1 diff --git a/js/Sources/STEP_FUNCTION.js b/js/Sources/STEP_FUNCTION.js index 8f6209f0..7b98b38a 100644 --- a/js/Sources/STEP_FUNCTION.js +++ b/js/Sources/STEP_FUNCTION.js @@ -7,25 +7,25 @@ function STEP_FUNCTION() { scs_m_1.objs[3-1] = scicos_link(); scs_m_1.objs[4-1] = scicos_link(); var blk = scs_m_1.objs[1-1]; - var graphics = blk.graphics; + this.graphics = blk.graphics; this.model = blk.model; - graphics.orig = [0,0]; - graphics.sz = [40,40]; - graphics.pein = 4; - graphics.peout = 4; - graphics.pout = 3; - blk.graphics = graphics; + this.graphics.orig = new ScilabDouble([0,0]); + this.graphics.sz = new ScilabDouble([40,40]); + this.graphics.pein = new ScilabDouble([4]); + this.graphics.peout = new ScilabDouble([4]); + this.graphics.pout = new ScilabDouble([3]); + blk.graphics = this.graphics; blk.model = this.model; scs_m_1.objs[1-1] = blk; var blk = scs_m_1.objs[2-1]; - var graphics = blk.graphics; + this.graphics = blk.graphics; this.model = blk.model; - graphics.orig = [80,10]; - graphics.sz = [20,20]; - graphics.exprs = ["1"]; + this.graphics.orig = new ScilabDouble([80,10]); + this.graphics.sz = new ScilabDouble([20,20]); + this.graphics.exprs = new ScilabDouble(["1"]); this.model.ipar = new ScilabDouble([1]); - graphics.pin = 3; - blk.graphics = graphics; + this.graphics.pin = new ScilabDouble([3]); + blk.graphics = this.graphics; blk.model = this.model; scs_m_1.objs[2-1] = blk; var lnk = scs_m_1.objs[3-1]; diff --git a/js/Sources/STEP_FUNCTION.pickle b/js/Sources/STEP_FUNCTION.pickle index 4c1ac5ae..50a906e4 100644 --- a/js/Sources/STEP_FUNCTION.pickle +++ b/js/Sources/STEP_FUNCTION.pickle @@ -8,8 +8,10 @@ aS'model' p3 aS'xxn' p4 -atp5 -Rp6 +aS'graphics' +p5 +atp6 +Rp7 .(dp0 S'lnk.ct' p1 diff --git a/js/Sources/SampleCLK.js b/js/Sources/SampleCLK.js index f066d4b2..f09912f7 100644 --- a/js/Sources/SampleCLK.js +++ b/js/Sources/SampleCLK.js @@ -26,9 +26,9 @@ function SampleCLK() { this.frequ = arguments[0]["frequ"] this.offset = arguments[0]["offset"] this.x = arg1; - var graphics = arg1.graphics; + this.graphics = arg1.graphics; this.model = arg1.model; - var exprs = graphics.exprs; + var exprs = this.graphics.exprs; while (true) { [ok,this.frequ,this.offset,exprs] = scicos_getvalue("Set block parameters",["Sample time","Offset"],list("vec",1,"vec",1),exprs); if (!ok) { @@ -50,8 +50,8 @@ function SampleCLK() { this.model.rpar = new ScilabDouble([this.frequ],[this.offset]); this.model.evtout = new ScilabDouble([1]); this.model.firing = new ScilabDouble([-1]); - graphics.exprs = exprs; - this.x.graphics = graphics; + this.graphics.exprs = new ScilabDouble([exprs]); + this.x.graphics = this.graphics; this.x.model = this.model; break; } diff --git a/js/Sources/SampleCLK.pickle b/js/Sources/SampleCLK.pickle index 4cf41094..1f55629a 100644 --- a/js/Sources/SampleCLK.pickle +++ b/js/Sources/SampleCLK.pickle @@ -6,12 +6,14 @@ S'x' p2 aS'model' p3 -aS'frequ' -p4 aS'offset' +p4 +aS'frequ' p5 -atp6 -Rp7 +aS'graphics' +p6 +atp7 +Rp8 .(dp0 S'needcompile' p1 diff --git a/js/Sources/TKSCALE.js b/js/Sources/TKSCALE.js index c5909fd1..68ea3bf2 100644 --- a/js/Sources/TKSCALE.js +++ b/js/Sources/TKSCALE.js @@ -32,14 +32,14 @@ function TKSCALE() { this.b = parseFloat(arguments[0]["b"]) this.f = parseFloat(arguments[0]["f"]) this.x = arg1; - var graphics = arg1.graphics; - var exprs = graphics.exprs; + this.graphics = arg1.graphics; + var exprs = this.graphics.exprs; this.model = arg1.model; [ok,this.a,this.b,this.f,exprs] = scicos_getvalue("Set scale block parameters",["Min value","Max value","Normalization"],list("vec",1,"vec",1,"vec",1),exprs); if (ok) { - graphics.exprs = exprs; + this.graphics.exprs = new ScilabDouble([exprs]); this.model.rpar = new ScilabDouble([this.a],[this.b],[this.f]); - this.x.graphics = graphics; + this.x.graphics = this.graphics; this.x.model = this.model; } return new BasicBlock(this.x); diff --git a/js/Sources/TKSCALE.pickle b/js/Sources/TKSCALE.pickle index 65a8742d..4547b11f 100644 --- a/js/Sources/TKSCALE.pickle +++ b/js/Sources/TKSCALE.pickle @@ -4,16 +4,18 @@ p0 ((lp1 S'a' p2 -aS'x' +aS'b' p3 -aS'model' +aS'f' p4 -aS'b' +aS'graphics' p5 -aS'f' +aS'x' p6 -atp7 -Rp8 +aS'model' +p7 +atp8 +Rp9 .(dp0 S'a' p1 |