summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--blocks.js14
-rwxr-xr-xhistory.txt2
-rw-r--r--lang-de.js4
-rw-r--r--locale.js4
-rw-r--r--threads.js5
5 files changed, 20 insertions, 9 deletions
diff --git a/blocks.js b/blocks.js
index 4501b0f..4f6466a 100644
--- a/blocks.js
+++ b/blocks.js
@@ -412,7 +412,7 @@ SyntaxElementMorph.prototype.allEmptySlots = function () {
SyntaxElementMorph.prototype.replaceInput = function (oldArg, newArg) {
var scripts = this.parentThatIsA(ScriptsMorph),
- replacement,
+ replacement = newArg,
idx = this.children.indexOf(oldArg),
nb;
@@ -424,10 +424,13 @@ SyntaxElementMorph.prototype.replaceInput = function (oldArg, newArg) {
newArg.parent.removeChild(newArg);
}
- if (oldArg instanceof MultiArgMorph && this.dynamicInputLabels) {
- replacement = new ArgLabelMorph(newArg);
- } else {
- replacement = newArg;
+ if (oldArg instanceof MultiArgMorph) {
+ oldArg.inputs().forEach(function (inp) { // preserve nested reporters
+ oldArg.replaceInput(inp, new InputSlotMorph());
+ });
+ if (this.dynamicInputLabels) {
+ replacement = new ArgLabelMorph(newArg);
+ }
}
replacement.parent = this;
@@ -969,6 +972,7 @@ SyntaxElementMorph.prototype.labelPart = function (spec) {
false,
{
abs : ['abs'],
+ floor : ['floor'],
sqrt : ['sqrt'],
sin : ['sin'],
cos : ['cos'],
diff --git a/history.txt b/history.txt
index 6140b94..1e04b7e 100755
--- a/history.txt
+++ b/history.txt
@@ -1803,3 +1803,5 @@ ______
130711
------
* Blocks: fixed occasional flickering in scripting areas (caused by deleted feedback morphs, a bug that surfaced in Chrome 28 on OSX and may be due to a possible Chrome GC issue)
+* Blocks: preserve nested blocks in the scripting area when replacing a variadic input list with another input ("kick out" the nested blocks instead of "swallowing" them)
+* Blocks, Threads: new floor() function in monadic math reporter's drop-down
diff --git a/lang-de.js b/lang-de.js
index 17cd62f..fa44b96 100644
--- a/lang-de.js
+++ b/lang-de.js
@@ -185,7 +185,7 @@ SnapTranslator.dict.de = {
'translator_e-mail':
'jens@moenig.org', // optional
'last_changed':
- '2013-07-02', // this, too, will appear in the Translators tab
+ '2013-07-11', // this, too, will appear in the Translators tab
// GUI
// control bar:
@@ -1176,6 +1176,8 @@ SnapTranslator.dict.de = {
// math functions
'abs':
'Betrag',
+ 'floor':
+ 'Abgerundet',
'sqrt':
'Wurzel',
'sin':
diff --git a/locale.js b/locale.js
index 5edcfcc..cb947ea 100644
--- a/locale.js
+++ b/locale.js
@@ -42,7 +42,7 @@
/*global modules, contains*/
-modules.locale = '2013-July-02';
+modules.locale = '2013-July-11';
// Global stuff
@@ -149,7 +149,7 @@ SnapTranslator.dict.de = {
'translator_e-mail':
'jens@moenig.org',
'last_changed':
- '2013-07-02'
+ '2013-07-11'
};
SnapTranslator.dict.it = {
diff --git a/threads.js b/threads.js
index 5aea6ec..c67360a 100644
--- a/threads.js
+++ b/threads.js
@@ -83,7 +83,7 @@ ArgLabelMorph, localize*/
// Global stuff ////////////////////////////////////////////////////////
-modules.threads = '2013-July-09';
+modules.threads = '2013-July-11';
var ThreadManager;
var Process;
@@ -1876,6 +1876,9 @@ Process.prototype.reportMonadic = function (fname, n) {
case 'abs':
result = Math.abs(x);
break;
+ case 'floor':
+ result = Math.floor(x);
+ break;
case 'sqrt':
result = Math.sqrt(x);
break;