From eb7c8e0cd42d4afe02be3adda2e94b6b0dfdaa00 Mon Sep 17 00:00:00 2001 From: Sunil Shetye Date: Tue, 26 Jun 2018 14:59:47 +0530 Subject: add return value from scicos_getvalue to global vars --- js/IntegerOp/JKFLIPFLOP.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'js/IntegerOp/JKFLIPFLOP.js') diff --git a/js/IntegerOp/JKFLIPFLOP.js b/js/IntegerOp/JKFLIPFLOP.js index 17aa3c0d..fcada59b 100644 --- a/js/IntegerOp/JKFLIPFLOP.js +++ b/js/IntegerOp/JKFLIPFLOP.js @@ -67,25 +67,25 @@ function JKFLIPFLOP() { model = xx.model; init_old = model.odstate[1-1]; while (true) { - [ok,init,exprs0] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"JKFLIPFLOP")],[" "],[gettext("JK flip-flop")],[" "],[gettext("The \'Initial Value\' must be 0 or 1 of type int8")],[gettext(" - Negative values are considered as int8(0)")],[gettext(" - Positive values are considered as int8(1)")],[" "]],gettext("Initial Value"),list("vec",1),exprs); + [ok,this.init,this.exprs0] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"JKFLIPFLOP")],[" "],[gettext("JK flip-flop")],[" "],[gettext("The \'Initial Value\' must be 0 or 1 of type int8")],[gettext(" - Negative values are considered as int8(0)")],[gettext(" - Positive values are considered as int8(1)")],[" "]],gettext("Initial Value"),list("vec",1),exprs); if (!ok) { break; } - if (init<=0) { - init = int8(0); - } else if (init>0) { - init = int8(1); + if (this.init<=0) { + this.init = int8(0); + } else if (this.init>0) { + this.init = int8(1); } if (ok) { - xx.graphics.exprs[1-1] = exprs0; - model.odstate[1-1] = init; + xx.graphics.exprs[1-1] = this.exprs0; + model.odstate[1-1] = this.init; xx.model = model; arg1.model.rpar.objs[path-1] = xx; break; } } needcompile = 0; - if (init_old!=init) { + if (init_old!=this.init) { newpar[size(newpar)+1-1] = 1; needcompile = 2; } -- cgit