diff options
author | Sunil Shetye | 2018-08-29 10:48:12 +0530 |
---|---|---|
committer | Sunil Shetye | 2018-08-29 18:03:04 +0530 |
commit | 352623792d2b9400510599c487540b1e763a7d3c (patch) | |
tree | 7711522f3fcd42a9d5f22b9fa3328763452a6918 /js/Sources | |
parent | 17a1beeeae647a6fbd0904a5d794ce7754df7eb2 (diff) | |
download | sci2js-352623792d2b9400510599c487540b1e763a7d3c.tar.gz sci2js-352623792d2b9400510599c487540b1e763a7d3c.tar.bz2 sci2js-352623792d2b9400510599c487540b1e763a7d3c.zip |
add the common code to get method also
type is a function
get the popup title from the value set in the get method
Diffstat (limited to 'js/Sources')
34 files changed, 171 insertions, 73 deletions
diff --git a/js/Sources/CLKINV_f.js b/js/Sources/CLKINV_f.js index 8f878294..f949749e 100644 --- a/js/Sources/CLKINV_f.js +++ b/js/Sources/CLKINV_f.js @@ -18,6 +18,9 @@ function CLKINV_f() { return this.x; } CLKINV_f.prototype.get = function CLKINV_f() { + var exprs = this.graphics.exprs; + var exprs = exprs[1-1]; + this.set_param_popup_title = msprintf("Set %s block parameters","CLKINV_f"); var options = { prt:["Port Number",this.prt], } @@ -49,7 +52,6 @@ function CLKINV_f() { return new EventInBlock(this.x); } CLKINV_f.prototype.get_popup_title = function CLKINV_f() { - var set_param_popup_title = msprintf("Set %s block parameters","CLKINV_f"); - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sources/CLKIN_f.js b/js/Sources/CLKIN_f.js index f3f27a7a..4c7e52aa 100644 --- a/js/Sources/CLKIN_f.js +++ b/js/Sources/CLKIN_f.js @@ -17,6 +17,9 @@ function CLKIN_f() { return this.x; } CLKIN_f.prototype.get = function CLKIN_f() { + var exprs = this.graphics.exprs; + var exprs = exprs[1-1]; + this.set_param_popup_title = "Set Event Input block parameters"; var options = { prt:["Port number",this.prt], } @@ -49,7 +52,6 @@ function CLKIN_f() { return new BasicBlock(this.x); } CLKIN_f.prototype.get_popup_title = function CLKIN_f() { - var set_param_popup_title = "Set Event Input block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sources/CLOCK_c.js b/js/Sources/CLOCK_c.js index 3d26fb6f..c33cab71 100644 --- a/js/Sources/CLOCK_c.js +++ b/js/Sources/CLOCK_c.js @@ -46,6 +46,18 @@ function CLOCK_c() { return this.x; } CLOCK_c.prototype.get = function CLOCK_c() { + if (typeof(o)=="Block"&&o.gui=="EVTDLY_c") { + var path = i; + break; + } + } + var newpar = list(); + var exprs = xx.graphics.exprs; + this.model = xx.model; + var t0_old = this.model.firing; + var dt_old = this.model.rpar[1-1]; + var model_n = this.model; + this.set_param_popup_title = msprintf("Set %s block parameters","CLOCK_c"); var options = { dt:["Period",this.dt], t0:["Initialisation Time",this.t0], @@ -97,7 +109,6 @@ function CLOCK_c() { return new BasicBlock(this.x); } CLOCK_c.prototype.get_popup_title = function CLOCK_c() { - var set_param_popup_title = msprintf("Set %s block parameters","CLOCK_c"); - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sources/CLOCK_f.js b/js/Sources/CLOCK_f.js index bfb4e031..291cf09d 100644 --- a/js/Sources/CLOCK_f.js +++ b/js/Sources/CLOCK_f.js @@ -46,6 +46,18 @@ function CLOCK_f() { return this.x; } CLOCK_f.prototype.get = function CLOCK_f() { + if (typeof(o)=="Block"&&o.gui=="EVTDLY_f") { + var path = i; + break; + } + } + var newpar = list(); + var exprs = xx.graphics.exprs; + this.model = xx.model; + var t0_old = this.model.firing; + var dt_old = this.model.rpar; + var model_n = this.model; + this.set_param_popup_title = "Set Clock block parameters"; var options = { dt:["Period",this.dt], t0:["Init time",this.t0], @@ -98,7 +110,6 @@ function CLOCK_f() { return new BasicBlock(this.x); } CLOCK_f.prototype.get_popup_title = function CLOCK_f() { - var set_param_popup_title = "Set Clock block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sources/CONST.js b/js/Sources/CONST.js index 7bd1fcef..2aec9d20 100644 --- a/js/Sources/CONST.js +++ b/js/Sources/CONST.js @@ -18,6 +18,8 @@ function CONST() { return this.x; } CONST.prototype.get = function CONST() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set Contant Block"; var options = { C:["Constant",this.C], } @@ -52,7 +54,6 @@ function CONST() { return new BasicBlock(this.x); } CONST.prototype.get_popup_title = function CONST() { - var set_param_popup_title = "Set Contant Block"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sources/CONST_f.js b/js/Sources/CONST_f.js index 2b7d8d00..844e9309 100644 --- a/js/Sources/CONST_f.js +++ b/js/Sources/CONST_f.js @@ -18,6 +18,8 @@ function CONST_f() { return this.x; } CONST_f.prototype.get = function CONST_f() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set Contant Block"; var options = { C:["Constant",this.C], } @@ -48,7 +50,6 @@ function CONST_f() { return new BasicBlock(this.x); } CONST_f.prototype.get_popup_title = function CONST_f() { - var set_param_popup_title = "Set Contant Block"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sources/CONST_m.js b/js/Sources/CONST_m.js index 3260b4b9..9236c840 100644 --- a/js/Sources/CONST_m.js +++ b/js/Sources/CONST_m.js @@ -21,6 +21,8 @@ function CONST_m() { return this.x; } CONST_m.prototype.get = function CONST_m() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = msprintf("Set %s block parameters","CONST_m"); var options = { C:["Constant Value",this.C], } @@ -41,7 +43,7 @@ function CONST_m() { } else { this.model.sim = list(new ScilabString(["cstblk4_m"]), new ScilabDouble([4])); this.model.opar = list(this.C); - if ((this.type[this.C-1]==1)) { + if ((type(this.C)==1)) { if (isreal(this.C)) { var ot = 1; } else { @@ -79,7 +81,6 @@ function CONST_m() { return new BasicBlock(this.x); } CONST_m.prototype.get_popup_title = function CONST_m() { - var set_param_popup_title = msprintf("Set %s block parameters","CONST_m"); - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sources/CONST_m.pickle b/js/Sources/CONST_m.pickle index 0ac43ba7..0552c2a7 100644 --- a/js/Sources/CONST_m.pickle +++ b/js/Sources/CONST_m.pickle @@ -6,14 +6,12 @@ S'x' p2 aS'model' p3 -aS'type' -p4 aS'C' -p5 +p4 aS'graphics' -p6 -atp7 -Rp8 +p5 +atp6 +Rp7 .(dp0 S'arg1' p1 diff --git a/js/Sources/CURVE_c.js b/js/Sources/CURVE_c.js index 66164884..5c62f653 100644 --- a/js/Sources/CURVE_c.js +++ b/js/Sources/CURVE_c.js @@ -27,6 +27,10 @@ function CURVE_c() { return this.x; } CURVE_c.prototype.get = function CURVE_c() { + var exprs = this.graphics.exprs; + var ok = false; + var SaveExit = false; + this.set_param_popup_title = "Spline data"; var options = { Method:["Spline Method (0..7)",this.Method], xx:["x",this.xx], @@ -165,7 +169,6 @@ function CURVE_c() { return new BasicBlock(this.x); } CURVE_c.prototype.get_popup_title = function CURVE_c() { - var set_param_popup_title = "Spline data"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sources/CURV_f.js b/js/Sources/CURV_f.js index 1f0e2acc..26e020c7 100644 --- a/js/Sources/CURV_f.js +++ b/js/Sources/CURV_f.js @@ -67,7 +67,6 @@ function CURV_f() { return new BasicBlock(this.x); } CURV_f.prototype.get_popup_title = function CURV_f() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/Sources/Counter.js b/js/Sources/Counter.js index 5cd512f5..998036ca 100644 --- a/js/Sources/Counter.js +++ b/js/Sources/Counter.js @@ -22,6 +22,8 @@ function Counter() { return this.x; } Counter.prototype.get = function Counter() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = msprintf("Set %s block parameters","Counter"); var options = { minim:["Minimum",this.minim], maxim:["Maximum",this.maxim], @@ -58,7 +60,6 @@ function Counter() { return new BasicBlock(this.x); } Counter.prototype.get_popup_title = function Counter() { - var set_param_popup_title = msprintf("Set %s block parameters","Counter"); - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sources/FROMWSB.js b/js/Sources/FROMWSB.js index 010774a2..a3ffd864 100644 --- a/js/Sources/FROMWSB.js +++ b/js/Sources/FROMWSB.js @@ -83,7 +83,6 @@ function FROMWSB() { return new BasicBlock(this.x); } FROMWSB.prototype.get_popup_title = function FROMWSB() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/Sources/FROMWS_c.js b/js/Sources/FROMWS_c.js index 15c15f32..66dceb1c 100644 --- a/js/Sources/FROMWS_c.js +++ b/js/Sources/FROMWS_c.js @@ -25,6 +25,8 @@ function FROMWS_c() { return this.x; } FROMWS_c.prototype.get = function FROMWS_c() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set From_Workspace block parameters"; var options = { varnam:["Variable name",this.varnam], Method:["Interpolation Method",this.Method], @@ -84,7 +86,6 @@ function FROMWS_c() { return new BasicBlock(this.x); } FROMWS_c.prototype.get_popup_title = function FROMWS_c() { - var set_param_popup_title = "Set From_Workspace block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sources/GENSIN_f.js b/js/Sources/GENSIN_f.js index 621851cb..8f66cf51 100644 --- a/js/Sources/GENSIN_f.js +++ b/js/Sources/GENSIN_f.js @@ -20,6 +20,8 @@ function GENSIN_f() { return this.x; } GENSIN_f.prototype.get = function GENSIN_f() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = msprintf("Set %s block parameters","GENSIN_f"); var options = { M:["Magnitude",this.M], F:["Frequency (rad/s)",this.F], @@ -59,7 +61,6 @@ function GENSIN_f() { return new BasicBlock(this.x); } GENSIN_f.prototype.get_popup_title = function GENSIN_f() { - var set_param_popup_title = msprintf("Set %s block parameters","GENSIN_f"); - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sources/GENSQR_f.js b/js/Sources/GENSQR_f.js index c4061ffa..a72bbfd2 100644 --- a/js/Sources/GENSQR_f.js +++ b/js/Sources/GENSQR_f.js @@ -20,6 +20,11 @@ function GENSQR_f() { return this.x; } GENSQR_f.prototype.get = function GENSQR_f() { + var exprs = this.graphics.exprs; + if (size(exprs,"*")==2) { + var exprs = exprs[2-1]; + } + this.set_param_popup_title = "Set Square generator block parameters"; var options = { Amplitude:["Amplitude",this.Amplitude], } @@ -48,7 +53,6 @@ function GENSQR_f() { return new BasicBlock(this.x); } GENSQR_f.prototype.get_popup_title = function GENSQR_f() { - var set_param_popup_title = "Set Square generator block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sources/GEN_SQR.js b/js/Sources/GEN_SQR.js index 59afac78..7e21ad95 100644 --- a/js/Sources/GEN_SQR.js +++ b/js/Sources/GEN_SQR.js @@ -54,6 +54,16 @@ function GEN_SQR() { return this.x; } GEN_SQR.prototype.get = function GEN_SQR() { + var y = this.needcompile; + var typ = list(); + var exprs = this.graphics.exprs; + this.Btitre = "Set GEN_SQR parameters"; + var Exprs0 = [["Amin"],["Amax"],["rule"],["F"]]; + this.Bitems = [["Minimum Value"],["Maximum Value"],["Initial Value( 1= Minimum Value 2= Maximum Value)"],["Period (sec)"]]; + var Ss = list("mat",[-1,-1],"mat",[-1,-1],"pol",-1,"pol",-1); + this.scicos_context = struct(); + var ok = false; + this.set_param_popup_title = this.Btitre; var options = { scicos_context.Amin:["Minimum Value",this.scicos_context.Amin], scicos_context.Amax:["Maximum Value",this.scicos_context.Amax], @@ -108,7 +118,6 @@ function GEN_SQR() { return new BasicBlock(this.x); } GEN_SQR.prototype.get_popup_title = function GEN_SQR() { - var set_param_popup_title = "Set GEN_SQR parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sources/Ground_g.js b/js/Sources/Ground_g.js index ed2dcfee..e8417fa9 100644 --- a/js/Sources/Ground_g.js +++ b/js/Sources/Ground_g.js @@ -28,7 +28,6 @@ function Ground_g() { return new BasicBlock(this.x); } Ground_g.prototype.get_popup_title = function Ground_g() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/Sources/INIMPL_f.js b/js/Sources/INIMPL_f.js index 757a3ae6..5949a756 100644 --- a/js/Sources/INIMPL_f.js +++ b/js/Sources/INIMPL_f.js @@ -23,6 +23,11 @@ function INIMPL_f() { return this.x; } INIMPL_f.prototype.get = function INIMPL_f() { + var exprs = this.graphics.exprs; + if (size(exprs,"*")==2) { + var exprs = exprs[1-1]; + } + this.set_param_popup_title = msprintf("Set %s block parameters","INIMPL_f"); var options = { prt:["Port Number",this.prt], } @@ -58,7 +63,6 @@ function INIMPL_f() { return new ImplicitInBlock(this.x); } INIMPL_f.prototype.get_popup_title = function INIMPL_f() { - var set_param_popup_title = msprintf("Set %s block parameters","INIMPL_f"); - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sources/IN_f.js b/js/Sources/IN_f.js index 4961bb74..8d44dd82 100644 --- a/js/Sources/IN_f.js +++ b/js/Sources/IN_f.js @@ -68,7 +68,6 @@ function IN_f() { return new ExplicitInBlock(this.x); } IN_f.prototype.get_popup_title = function IN_f() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/Sources/Modulo_Count.js b/js/Sources/Modulo_Count.js index d6c37e8e..ae60e13d 100644 --- a/js/Sources/Modulo_Count.js +++ b/js/Sources/Modulo_Count.js @@ -20,6 +20,8 @@ function Modulo_Count() { return this.x; } Modulo_Count.prototype.get = function Modulo_Count() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = msprintf("Set %s block parameters","Modulo_Count"); var options = { ini_c:["Initial State (zero or positive number)",this.ini_c], base:["Upper Limit (positive number)",this.base], @@ -54,7 +56,6 @@ function Modulo_Count() { return new BasicBlock(this.x); } Modulo_Count.prototype.get_popup_title = function Modulo_Count() { - var set_param_popup_title = msprintf("Set %s block parameters","Modulo_Count"); - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sources/PULSE_SC.js b/js/Sources/PULSE_SC.js index c1bd8dc8..7daafb63 100644 --- a/js/Sources/PULSE_SC.js +++ b/js/Sources/PULSE_SC.js @@ -49,6 +49,16 @@ function PULSE_SC() { return this.x; } PULSE_SC.prototype.get = function PULSE_SC() { + var y = this.needcompile; + var typ = list(); + var exprs = this.graphics.exprs; + this.Btitre = "Set Pulse Generator parameters"; + var Exprs0 = [["E"],["W"],["F"],["A"]]; + this.Bitems = [["Phase delay (secs):"],["Pulse Width (% of period):"],["Period (secs):"],["Amplitude:"]]; + var Ss = list("pol",-1,"pol",-1,"pol",-1,"mat",[-1,-1]); + this.scicos_context = struct(); + var ok = false; + this.set_param_popup_title = this.Btitre; var options = { scicos_context.E:["Phase delay (secs):",this.scicos_context.E], scicos_context.W:["Pulse Width (% of period):",this.scicos_context.W], @@ -104,7 +114,6 @@ function PULSE_SC() { return new BasicBlock(this.x); } PULSE_SC.prototype.get_popup_title = function PULSE_SC() { - var set_param_popup_title = "Set Pulse Generator parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sources/RAMP.js b/js/Sources/RAMP.js index f49c9ca1..2e68244b 100644 --- a/js/Sources/RAMP.js +++ b/js/Sources/RAMP.js @@ -23,6 +23,8 @@ function RAMP() { return this.x; } RAMP.prototype.get = function RAMP() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = msprintf("Set %s block parameters","RAMP"); var options = { slope:["Slope",this.slope], stt:["Start Time",this.stt], @@ -54,7 +56,6 @@ function RAMP() { return new BasicBlock(this.x); } RAMP.prototype.get_popup_title = function RAMP() { - var set_param_popup_title = msprintf("Set %s block parameters","RAMP"); - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sources/RAND_f.js b/js/Sources/RAND_f.js index 95b91026..65c53b2e 100644 --- a/js/Sources/RAND_f.js +++ b/js/Sources/RAND_f.js @@ -24,6 +24,14 @@ function RAND_f() { return this.x; } RAND_f.prototype.get = function RAND_f() { + var exprs = this.graphics.exprs; + if (size(exprs,"*")==5) { + var exprs = exprs.slice(1-1,3); + } + if (size(exprs,"*")==3) { + var exprs = [[exprs],[string(this.model.dstate[1-1])]]; + } + this.set_param_popup_title = "Set Random generator block parameters"; var options = { flag:["flag",this.flag], a:["A",this.a], @@ -68,7 +76,6 @@ function RAND_f() { return new BasicBlock(this.x); } RAND_f.prototype.get_popup_title = function RAND_f() { - var set_param_popup_title = "Set Random generator block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sources/RAND_m.js b/js/Sources/RAND_m.js index d4f2ae03..a6d6e050 100644 --- a/js/Sources/RAND_m.js +++ b/js/Sources/RAND_m.js @@ -33,6 +33,11 @@ function RAND_m() { return this.x; } RAND_m.prototype.get = function RAND_m() { + var exprs = this.graphics.exprs; + if (size(exprs,"*")==14) { + exprs[9-1] = []; + } + this.set_param_popup_title = "Set Random generator block parameters"; var options = { typ:["Datatype(1=real double 2=complex)",this.typ], flag:["flag",this.flag], @@ -97,7 +102,6 @@ function RAND_m() { return new BasicBlock(this.x); } RAND_m.prototype.get_popup_title = function RAND_m() { - var set_param_popup_title = "Set Random generator block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sources/READAU_f.js b/js/Sources/READAU_f.js index a6a73f59..1706e13a 100644 --- a/js/Sources/READAU_f.js +++ b/js/Sources/READAU_f.js @@ -29,6 +29,15 @@ function READAU_f() { return this.x; } READAU_f.prototype.get = function READAU_f() { + var exprs = this.graphics.exprs; + var out = this.model.out; + var dstate = this.model.dstate; + var ipar = this.model.ipar; + var imask = 9+ipar[1-1]; + var tmask = ipar[imask-1]; + var lunit = dstate[3-1]; + var fname = exprs[1-1]; + this.set_param_popup_title = msprintf("Set %s block parameters","READAU_f"); var options = { fname1:["Input File Name",this.fname1], N:["Buffer size",this.N], @@ -94,7 +103,6 @@ function READAU_f() { return new BasicBlock(this.x); } READAU_f.prototype.get_popup_title = function READAU_f() { - var set_param_popup_title = msprintf("Set %s block parameters","READAU_f"); - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sources/READC_f.js b/js/Sources/READC_f.js index c50c8718..1506c210 100644 --- a/js/Sources/READC_f.js +++ b/js/Sources/READC_f.js @@ -33,6 +33,17 @@ function READC_f() { return this.x; } READC_f.prototype.get = function READC_f() { + this.model = this.x.model; + var exprs = this.graphics.exprs; + var out = this.model.out; + var dstate = this.model.dstate; + var ipar = this.model.ipar; + var imask = 9+ipar[1-1]; + var tmask = ipar[imask-1]; + var lunit = dstate[3-1]; + var fname = exprs[3-1]; + var frmt = exprs[4-1]; + this.set_param_popup_title = msprintf("Set %s block parameters","READC_f"); var options = { tmask1:["Time Record Selection",this.tmask1], outmask:["Outputs Record Selection",this.outmask], @@ -139,7 +150,6 @@ function READC_f() { return new BasicBlock(this.x); } READC_f.prototype.get_popup_title = function READC_f() { - var set_param_popup_title = msprintf("Set %s block parameters","READC_f"); - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sources/RFILE_f.js b/js/Sources/RFILE_f.js index bd682931..dd34174b 100644 --- a/js/Sources/RFILE_f.js +++ b/js/Sources/RFILE_f.js @@ -29,6 +29,20 @@ function RFILE_f() { return this.x; } RFILE_f.prototype.get = function RFILE_f() { + var exprs = this.graphics.exprs; + var dstate = this.model.dstate; + var ipar = this.model.ipar; + var ievt = ipar[3-1]; + this.N = ipar[4-1]; + var imask = 5+ipar[1-1]+ipar[2-1]; + var tmask = ipar[imask-1]; + var lunit = dstate[3-1]; + var fname = exprs[3-1]; + var frmt = exprs[4-1]; + if (size(exprs,"*")>5) { + exprs[6-1] = []; + } + this.set_param_popup_title = msprintf("Set %s block parameters","RFILE_f"); var options = { tmask1:["Time Record Selection",this.tmask1], outmask:["Outputs Record Selection",this.outmask], @@ -121,7 +135,6 @@ function RFILE_f() { return new BasicBlock(this.x); } RFILE_f.prototype.get_popup_title = function RFILE_f() { - var set_param_popup_title = msprintf("Set %s block parameters","RFILE_f"); - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sources/SAWTOOTH_f.js b/js/Sources/SAWTOOTH_f.js index e15946ec..a952d277 100644 --- a/js/Sources/SAWTOOTH_f.js +++ b/js/Sources/SAWTOOTH_f.js @@ -23,7 +23,6 @@ function SAWTOOTH_f() { return new BasicBlock(this.x); } SAWTOOTH_f.prototype.get_popup_title = function SAWTOOTH_f() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/Sources/STEP.js b/js/Sources/STEP.js index 4c6c6f7a..65706b32 100644 --- a/js/Sources/STEP.js +++ b/js/Sources/STEP.js @@ -22,6 +22,8 @@ function STEP() { return this.x; } STEP.prototype.get = function STEP() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = msprintf("Set %s block parameters","STEP_FUNCTION"); var options = { temps:["Step Time",this.temps], in1:["Initial Value",this.in1], @@ -77,7 +79,6 @@ function STEP() { return new BasicBlock(this.x); } STEP.prototype.get_popup_title = function STEP() { - var set_param_popup_title = msprintf("Set %s block parameters","STEP_FUNCTION"); - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sources/STEP_FUNCTION.js b/js/Sources/STEP_FUNCTION.js index 5caf7500..fa182cb0 100644 --- a/js/Sources/STEP_FUNCTION.js +++ b/js/Sources/STEP_FUNCTION.js @@ -119,7 +119,6 @@ function STEP_FUNCTION() { return new BasicBlock(this.x); } STEP_FUNCTION.prototype.get_popup_title = function STEP_FUNCTION() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/Sources/SampleCLK.js b/js/Sources/SampleCLK.js index c563276a..acee4c3c 100644 --- a/js/Sources/SampleCLK.js +++ b/js/Sources/SampleCLK.js @@ -16,6 +16,8 @@ function SampleCLK() { return this.x; } SampleCLK.prototype.get = function SampleCLK() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set block parameters"; var options = { frequ:["Sample time",this.frequ], offset:["Offset",this.offset], @@ -60,7 +62,6 @@ function SampleCLK() { return new BasicBlock(this.x); } SampleCLK.prototype.get_popup_title = function SampleCLK() { - var set_param_popup_title = "Set block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sources/Sigbuilder.js b/js/Sources/Sigbuilder.js index 775c775f..9383cc34 100644 --- a/js/Sources/Sigbuilder.js +++ b/js/Sources/Sigbuilder.js @@ -88,7 +88,6 @@ function Sigbuilder() { return new BasicBlock(this.x); } Sigbuilder.prototype.get_popup_title = function Sigbuilder() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/Sources/TIME_f.js b/js/Sources/TIME_f.js index ad06fe4c..f51d4ba6 100644 --- a/js/Sources/TIME_f.js +++ b/js/Sources/TIME_f.js @@ -20,7 +20,6 @@ function TIME_f() { return new BasicBlock(this.x); } TIME_f.prototype.get_popup_title = function TIME_f() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/Sources/TKSCALE.js b/js/Sources/TKSCALE.js index b4529690..70fcf9f8 100644 --- a/js/Sources/TKSCALE.js +++ b/js/Sources/TKSCALE.js @@ -20,6 +20,8 @@ function TKSCALE() { return this.x; } TKSCALE.prototype.get = function TKSCALE() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set scale block parameters"; var options = { a:["Min value",this.a], b:["Max value",this.b], @@ -43,7 +45,6 @@ function TKSCALE() { return new BasicBlock(this.x); } TKSCALE.prototype.get_popup_title = function TKSCALE() { - var set_param_popup_title = "Set scale block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } |