kopia lustrzana https://github.com/backface/turtlestitch
show all own vars and attributes in INHERIT drop-down when inside a ring
rodzic
f2bbff3d54
commit
be0285268b
19
blocks.js
19
blocks.js
|
@ -8559,7 +8559,24 @@ InputSlotMorph.prototype.shadowedVariablesMenu = function () {
|
||||||
|
|
||||||
if (!block) {return dict; }
|
if (!block) {return dict; }
|
||||||
rcvr = block.scriptTarget();
|
rcvr = block.scriptTarget();
|
||||||
if (rcvr && rcvr.exemplar) {
|
if (this.parentThatIsA(RingMorph)) {
|
||||||
|
// show own local vars and attributes, because this is likely to be
|
||||||
|
// inside TELL, ASK or OF
|
||||||
|
vars = rcvr.variables.names();
|
||||||
|
vars.forEach(function (name) {
|
||||||
|
dict[name] = name;
|
||||||
|
});
|
||||||
|
attribs = rcvr.attributes;
|
||||||
|
/*
|
||||||
|
if (vars.length && attribs.length) {
|
||||||
|
dict['~'] = null; // add line
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
attribs.forEach(function (name) {
|
||||||
|
dict[name] = [name];
|
||||||
|
});
|
||||||
|
} else if (rcvr && rcvr.exemplar) {
|
||||||
|
// only show shadowed vars and attributes
|
||||||
vars = rcvr.inheritedVariableNames(true);
|
vars = rcvr.inheritedVariableNames(true);
|
||||||
vars.forEach(function (name) {
|
vars.forEach(function (name) {
|
||||||
dict[name] = name;
|
dict[name] = name;
|
||||||
|
|
|
@ -3708,6 +3708,8 @@ Fixes:
|
||||||
* Blocks: keep “undo” and “redo” buttons at the same location
|
* Blocks: keep “undo” and “redo” buttons at the same location
|
||||||
* Objects, Threads: added "with inpus" to TELL and ASK prims, changed TELL's C-shape to command-style input
|
* Objects, Threads: added "with inpus" to TELL and ASK prims, changed TELL's C-shape to command-style input
|
||||||
* Objects: moved TELL and ASK templates in the palette up underneath RUN CALL
|
* Objects: moved TELL and ASK templates in the palette up underneath RUN CALL
|
||||||
|
* Blocks: show all own vars and attributes in INHERIT drop-down when inside a ring
|
||||||
|
|
||||||
|
|
||||||
v4.1 Features:
|
v4.1 Features:
|
||||||
* polymorphic sprite-local custom blocks
|
* polymorphic sprite-local custom blocks
|
||||||
|
|
Ładowanie…
Reference in New Issue