kopia lustrzana https://github.com/backface/turtlestitch
BYOB: Newly created custom reporters now have an initial default REPORT block as definition body
rodzic
12ba9b7703
commit
a2094b033e
14
byob.js
14
byob.js
|
|
@ -105,7 +105,7 @@ CommentMorph, localize, CSlotMorph, SpeechBubbleMorph, MorphicPreferences*/
|
||||||
|
|
||||||
// Global stuff ////////////////////////////////////////////////////////
|
// Global stuff ////////////////////////////////////////////////////////
|
||||||
|
|
||||||
modules.byob = '2013-May-16';
|
modules.byob = '2013-June-06';
|
||||||
|
|
||||||
// Declarations
|
// Declarations
|
||||||
|
|
||||||
|
|
@ -1336,7 +1336,7 @@ BlockDialogMorph.prototype.setScope = function (varType) {
|
||||||
// other ops
|
// other ops
|
||||||
|
|
||||||
BlockDialogMorph.prototype.getInput = function () {
|
BlockDialogMorph.prototype.getInput = function () {
|
||||||
var spec, def;
|
var spec, def, body;
|
||||||
if (this.body instanceof InputFieldMorph) {
|
if (this.body instanceof InputFieldMorph) {
|
||||||
spec = this.normalizeSpaces(this.body.getValue());
|
spec = this.normalizeSpaces(this.body.getValue());
|
||||||
}
|
}
|
||||||
|
|
@ -1344,6 +1344,16 @@ BlockDialogMorph.prototype.getInput = function () {
|
||||||
def.type = this.blockType;
|
def.type = this.blockType;
|
||||||
def.category = this.category;
|
def.category = this.category;
|
||||||
def.isGlobal = this.isGlobal;
|
def.isGlobal = this.isGlobal;
|
||||||
|
if (def.type === 'reporter' || def.type === 'predicate') {
|
||||||
|
body = Process.prototype.reify.call(
|
||||||
|
null,
|
||||||
|
SpriteMorph.prototype.blockForSelector('doReport'),
|
||||||
|
new List(),
|
||||||
|
true // ignore empty slots for custom block reification
|
||||||
|
);
|
||||||
|
body.outerContext = null;
|
||||||
|
def.body = body;
|
||||||
|
}
|
||||||
return def;
|
return def;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1727,3 +1727,7 @@ ______
|
||||||
130605
|
130605
|
||||||
------
|
------
|
||||||
* Objects: fix for hiding 'getLastAnswer' and 'getTimer' primitives
|
* Objects: fix for hiding 'getLastAnswer' and 'getTimer' primitives
|
||||||
|
|
||||||
|
130606
|
||||||
|
------
|
||||||
|
* BYOB: Newly created custom reporters now have an initial default REPORT block as definition body
|
||||||
|
|
|
||||||
Ładowanie…
Reference in New Issue