fixed a glitch that raised an error instead of creating an “obsolete” block

upd4.1
Jens Mönig 2017-10-28 13:04:25 +02:00
rodzic 9954794ae7
commit a8b13d829f
3 zmienionych plików z 19 dodań i 5 usunięć

8
gui.js
Wyświetl plik

@ -482,7 +482,11 @@ IDE_Morph.prototype.openIn = function (world) {
SnapCloud.getPublicProject(
SnapCloud.encodeDict(dict),
function (projectData) {
window.open('data:text/xml,' + projectData);
myself.saveXMLAs(projectData, dict.ProjectName);
myself.showMessage(
'Saved project\n' + dict.ProjectName,
2
);
},
this.cloudError()
);
@ -3382,7 +3386,7 @@ IDE_Morph.prototype.aboutSnap = function () {
module, btn1, btn2, btn3, btn4, licenseBtn, translatorsBtn,
world = this.world();
aboutTxt = 'Snap! 4.1.0.1\nBuild Your Own Blocks\n\n'
aboutTxt = 'Snap! 4.1.0.2\nBuild Your Own Blocks\n\n'
+ 'Copyright \u24B8 2017 Jens M\u00F6nig and '
+ 'Brian Harvey\n'
+ 'jens@moenig.org, bh@cs.berkeley.edu\n\n'

Wyświetl plik

@ -3781,3 +3781,9 @@ Fixes:
=== v4.1.0.1 maintenance release ===
171028
------
* Store: fixed a glitch that raised an error instead of creating an “obsolete” block
=== v4.1.0.2 maintenance release ===

Wyświetl plik

@ -1135,9 +1135,13 @@ SnapSerializer.prototype.loadBlock = function (model, isReporter, object) {
// lookup in inherited methods
info = detect(receiver.customBlocks, function (block) {
return block.blockSpec() === model.attributes.s;
}) || detect(receiver.inheritedMethodsCache, function (block) {
return block.blockSpec() === model.attributes.s;
});
}) || (
receiver.inheritedMethodsCache ?
detect(receiver.inheritedMethodsCache, function (block) {
return block.blockSpec() === model.attributes.s;
})
: null
);
}
if (!info) {
return this.obsoleteBlock(isReporter);