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 ////////////////////////////////////////////////////////
|
||||
|
||||
modules.blocks = '2017-August-03';
|
||||
modules.blocks = '2017-August-29';
|
||||
|
||||
var SyntaxElementMorph;
|
||||
var BlockMorph;
|
||||
|
@ -8289,6 +8289,7 @@ InputSlotMorph.prototype.gettablesMenu = function () {
|
|||
if (StageMorph.prototype.enableInheritance) {
|
||||
dict.children = ['children'];
|
||||
dict.parent = ['parent'];
|
||||
dict['temporary?'] = ['temporary?'];
|
||||
}
|
||||
dict.name = ['name'];
|
||||
dict.costumes = ['costumes'];
|
||||
|
|
|
@ -3592,6 +3592,7 @@ Fixes:
|
|||
------
|
||||
* 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
|
||||
* Blocks, Threads: added “temporary?” as gettable and settable attribute for clones
|
||||
|
||||
|
||||
Features:
|
||||
|
|
12
threads.js
12
threads.js
|
@ -3103,6 +3103,8 @@ Process.prototype.reportGet = function (query) {
|
|||
return thisObj.exemplar || '';
|
||||
case 'children':
|
||||
return new List(thisObj.specimens ? thisObj.specimens() : []);
|
||||
case 'temporary?':
|
||||
return thisObj.isTemporary || false;
|
||||
case 'clones':
|
||||
stage = thisObj.parentThatIsA(StageMorph);
|
||||
objName = thisObj.name || thisObj.cloneOriginName;
|
||||
|
@ -3190,6 +3192,16 @@ Process.prototype.doSet = function (attribute, value) {
|
|||
// needed: circularity avoidance
|
||||
rcvr.setExemplar(value);
|
||||
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?':
|
||||
this.assertType(rcvr, 'sprite');
|
||||
this.assertType(value, 'Boolean');
|
||||
|
|
Ładowanie…
Reference in New Issue