Variable-names drop-down menu when renaming blobs

renaming variable blobs now features a drop-down menu in the dialog box
with reachable variable names and a picture of the block to be renamed
pull/3/merge
jmoenig 2013-04-05 10:20:18 +02:00
rodzic 2e7ea3c14f
commit a4037b57c1
2 zmienionych plików z 12 dodań i 3 usunięć

Wyświetl plik

@ -153,7 +153,7 @@ DialogBoxMorph, BlockInputFragmentMorph, PrototypeHatBlockMorph*/
// Global stuff ////////////////////////////////////////////////////////
modules.blocks = '2013-April-04';
modules.blocks = '2013-April-05';
var SyntaxElementMorph;
var BlockMorph;
@ -1777,7 +1777,8 @@ BlockMorph.prototype.rebuild = function (contrast) {
BlockMorph.prototype.userMenu = function () {
var menu = new MenuMorph(this),
world = this.world(),
myself = this;
myself = this,
blck;
menu.addItem(
"help...",
@ -1788,6 +1789,8 @@ BlockMorph.prototype.userMenu = function () {
}
menu.addLine();
if (this.selector === 'reportGetVar') {
blck = this.fullCopy();
blck.addShadow();
menu.addItem(
'rename...',
function () {
@ -1798,7 +1801,9 @@ BlockMorph.prototype.userMenu = function () {
).prompt(
"Variable name",
myself.blockSpec,
world
world,
blck.fullImage(), // pic
InputSlotMorph.prototype.getVarNamesDict.call(myself)
);
}
);

Wyświetl plik

@ -1585,3 +1585,7 @@ ______
* loading shared projects in presentation mode, exporting URL for shared projects
* Selecting "Help" for a custom block now pops up the comment attached to its definition's prototype hat, if any
* BYOB fix for detaching comments from prototype hat blocks
130405
------
* renaming variable blobs now features a drop-down with reachable variable names and a picture of the block to be renamed