kopia lustrzana https://github.com/backface/turtlestitch
added “temporary?” as gettable and settable attribute for clones
rodzic
c7542642f7
commit
19b36c7ee7
|
@ -148,7 +148,7 @@ CustomCommandBlockMorph, SymbolMorph*/
|
||||||
|
|
||||||
// Global stuff ////////////////////////////////////////////////////////
|
// Global stuff ////////////////////////////////////////////////////////
|
||||||
|
|
||||||
modules.blocks = '2017-August-03';
|
modules.blocks = '2017-August-29';
|
||||||
|
|
||||||
var SyntaxElementMorph;
|
var SyntaxElementMorph;
|
||||||
var BlockMorph;
|
var BlockMorph;
|
||||||
|
@ -8289,6 +8289,7 @@ InputSlotMorph.prototype.gettablesMenu = function () {
|
||||||
if (StageMorph.prototype.enableInheritance) {
|
if (StageMorph.prototype.enableInheritance) {
|
||||||
dict.children = ['children'];
|
dict.children = ['children'];
|
||||||
dict.parent = ['parent'];
|
dict.parent = ['parent'];
|
||||||
|
dict['temporary?'] = ['temporary?'];
|
||||||
}
|
}
|
||||||
dict.name = ['name'];
|
dict.name = ['name'];
|
||||||
dict.costumes = ['costumes'];
|
dict.costumes = ['costumes'];
|
||||||
|
|
|
@ -3592,6 +3592,7 @@ Fixes:
|
||||||
------
|
------
|
||||||
* Threads: allow two-item lists as x-y coordinate arguments for “distance to” reporter
|
* Threads: allow two-item lists as x-y coordinate arguments for “distance to” reporter
|
||||||
* GUI, Objects: enable exporting costumes and variable-data in the newest Chrome version, which disables opening tabs on dataURLs
|
* GUI, Objects: enable exporting costumes and variable-data in the newest Chrome version, which disables opening tabs on dataURLs
|
||||||
|
* Blocks, Threads: added “temporary?” as gettable and settable attribute for clones
|
||||||
|
|
||||||
|
|
||||||
Features:
|
Features:
|
||||||
|
|
12
threads.js
12
threads.js
|
@ -3103,6 +3103,8 @@ Process.prototype.reportGet = function (query) {
|
||||||
return thisObj.exemplar || '';
|
return thisObj.exemplar || '';
|
||||||
case 'children':
|
case 'children':
|
||||||
return new List(thisObj.specimens ? thisObj.specimens() : []);
|
return new List(thisObj.specimens ? thisObj.specimens() : []);
|
||||||
|
case 'temporary?':
|
||||||
|
return thisObj.isTemporary || false;
|
||||||
case 'clones':
|
case 'clones':
|
||||||
stage = thisObj.parentThatIsA(StageMorph);
|
stage = thisObj.parentThatIsA(StageMorph);
|
||||||
objName = thisObj.name || thisObj.cloneOriginName;
|
objName = thisObj.name || thisObj.cloneOriginName;
|
||||||
|
@ -3190,6 +3192,16 @@ Process.prototype.doSet = function (attribute, value) {
|
||||||
// needed: circularity avoidance
|
// needed: circularity avoidance
|
||||||
rcvr.setExemplar(value);
|
rcvr.setExemplar(value);
|
||||||
break;
|
break;
|
||||||
|
case 'temporary?':
|
||||||
|
this.assertType(rcvr, 'sprite');
|
||||||
|
this.assertType(value, 'Boolean');
|
||||||
|
if (value) {
|
||||||
|
rcvr.release();
|
||||||
|
} else {
|
||||||
|
rcvr.perpetuate();
|
||||||
|
}
|
||||||
|
rcvr.version = Date.now();
|
||||||
|
break;
|
||||||
case 'dangling?':
|
case 'dangling?':
|
||||||
this.assertType(rcvr, 'sprite');
|
this.assertType(rcvr, 'sprite');
|
||||||
this.assertType(value, 'Boolean');
|
this.assertType(value, 'Boolean');
|
||||||
|
|
Ładowanie…
Reference in New Issue