summaryrefslogtreecommitdiff
path: root/js/Misc/DEBUG.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/Misc/DEBUG.js')
-rw-r--r--js/Misc/DEBUG.js53
1 files changed, 27 insertions, 26 deletions
diff --git a/js/Misc/DEBUG.js b/js/Misc/DEBUG.js
index 5ea59058..7c29a588 100644
--- a/js/Misc/DEBUG.js
+++ b/js/Misc/DEBUG.js
@@ -6,43 +6,44 @@ function DEBUG() {
model.blocktype = "d";
exprs = list("","xcos_debug_gui(flag,block);");
gr_i = [];
- x = standard_define([8,2],model,exprs,gr_i);
+ this.x = standard_define([8,2],model,exprs,gr_i);
}
DEBUG.prototype.details = function DEBUG() {
+ return this.x;
}
DEBUG.prototype.get = function DEBUG() {
}
DEBUG.prototype.set = function DEBUG() {
- x = arg1;
+ this.x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;
textmp = exprs[2-1];
ok = true;
while (1==1) {
- [txt] = this.dialog[[["Enter scilab instructions for debugging."],[" Inputs are block and flag, output is block"]]-1][textmp-1];
- if (txt!=[]) {
- tt = ["block=debug_scicos(block,flag)"];
- if (execstr("deff(tt,txt)","errcatch")==0) {
- warnMode = warning("query");
-warning("off");
-save(this.TMPDIR+"/debug_scicos",this.debug_scicos);
-warning(warnMode);
- exprs[2-1] = txt;
- if ((scicos_debug()!=2&&scicos_debug()!=3)) {
-scicos_debug(2);
-}
-break;
- } else {
-message([["Error in the instructions"],[lasterror()]]);
-}
- } else {
- ok = false;
-break;
-}
-}
+ [txt] = this.dialog[[["Enter scilab instructions for debugging."],[" Inputs are block and flag, output is block"]]-1][textmp-1];
+ if (txt!=[]) {
+ tt = ["block=debug_scicos(block,flag)"];
+ if (execstr("deff(tt,txt)","errcatch")==0) {
+ warnMode = warning("query");
+ warning("off");
+ save(this.TMPDIR+"/debug_scicos",this.debug_scicos);
+ warning(warnMode);
+ exprs[2-1] = txt;
+ if ((scicos_debug()!=2&&scicos_debug()!=3)) {
+ scicos_debug(2);
+ }
+ break;
+ } else {
+ message([["Error in the instructions"],[lasterror()]]);
+ }
+ } else {
+ ok = false;
+ break;
+ }
+ }
if (ok) {
- graphics.exprs = exprs;
- x.graphics = graphics;
-}
+ graphics.exprs = exprs;
+ this.x.graphics = graphics;
+ }
}
}