summaryrefslogtreecommitdiff
path: root/js/Misc/DSUPER.js
blob: 90eca99e912ce4d55ea40b856f710e48371714c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/* autogenerated from "macros/Misc/DSUPER.sci" */
function DSUPER() {
DSUPER.prototype.define = function DSUPER() {
}
DSUPER.prototype.details = function DSUPER() {
}
DSUPER.prototype.get = function DSUPER() {
}
DSUPER.prototype.set = function DSUPER() {
y=needcompile;
typ=list();
graphics=arg1.graphics;
if ((length(graphics.exprs)==0)) {
warnBlockByUID(arg1.model.label,gettext("Invalid masked block."));
x=arg1;
return;
}
exprs=graphics.exprs(1);
exprs0=graphics.exprs(2)(1);
btitre=graphics.exprs(2)(2)(1);
bitems=graphics.exprs(2)(2).slice(2-1,$);
if (exprs0==[]) {
x=arg1;
return;
}
context=[arg1.model.rpar.props.context];
[%scicos_context,ierr]=script2var(context,%scicos_context);
if (ierr!=0) {
x=arg1;
return;
}
tt="scicos_context."+exprs0(1);
for (i=2;i<=size(exprs0,1);i+=1) {
tt=tt+",scicos_context."+exprs0(i);
}
ss=graphics.exprs(2)(3);
scicos_context=%scicos_context;
execstr("[ok,"+tt+",exprs]=scicos_getvalue(btitre,bitems,ss,exprs)");
if (ok) {
x=arg1;
%scicos_context=scicos_context;
sblock=x.model.rpar;
[sblock,%w,needcompile2,ok]=do_eval(sblock,list(),scicos_context);
y=max(2,needcompile,needcompile2);
x.graphics.exprs[1-1]=exprs;
x.model.rpar=sblock;
} else {
x=arg1;
}
}
}