Woah, I never knew you were over 13(I can guess how old someone is by their behavior on the forums.). But I guess I was wrong because you have a GitHub account.
I want to turn
[scratchblocks]
() + ()
() * ()
() max () :: operators reporter
() min () :: operators reporter
() - ()
() / ()
() ^ () :: operators reporter
() mod ()
[/scratchblocks]
into
[scratchblocks]
() [+ v] () @delInput @addInput :: operators reporter
() [* v] () @delInput @addInput :: operators reporter
() [max v] () @delInput @addInput :: operators reporter
() [min v] () @delInput @addInput :: operators reporter
() [- v] () :: operators reporter
() [/ v] () :: operators reporter
() [^ v] () :: operators reporter
() [mod v] () :: operators reporter
[/scratchblocks]
And I've made the middle input types, but I just can't figure out how to have the first input with an offset of 0 and the second with an offset of 1 in the "block migrations".
Wouldn't the [scratchblocks] () [+ v] ()@delInput@addInput :: operators :: reporter[/scratchblocks] be the same as the multiplication one because the [+ v] is a dropdown?
Huh, I was going to refer you to the FAQ about settings, but to my surprise there isn't one. So here's the answer:
Every setting has to be checked, repeatedly, throughout your session. So having a setting slows Snap! down whether you enable it or not. We try to avoid them.
Sometimes it doesn't look that way because Jens adds temporary settings while debugging some feature, then removes the setting eventually.
Do you want to create expresssion builder
[scratchblocks]
() [+ v] () [- v] () @delInput @addInput :: operators reporter
[/scratchblocks]
or just try to replace "relabel" with drop down menu?
I can't seem to get the operator blocks to work in threads.js:
Process.prototype.reportCommutativeOperator = function (a, op, b) { // a is a number,
switch (op) { // op is an operator,
case '+': // b is a list of nums
return this.reportCombine(this.reportCONS(a, b), this.reportSum);
case '\u00D7':
return this.reportCombine(this.reportCONS(a, b), this.reportProduct);
case 'max':
return this.reportCombine(this.reportCONS(a, b), this.reportMax);
case 'min':
return this.reportCombine(this.reportCONS(a, b), this.reportMin);
};
};
Process.prototype.reportCommutativeOperator = function (a, op, b) {
switch (op) {
case '\u2212':
return this.reportDifference(a, b);
case '÷':
return this.reportQuotient(a, b);
case '^':
return this.reportPower(a, b);
case 'mod':
return this.reportModulus(a, b);
};
};