kopia lustrzana https://github.com/backface/turtlestitch
Merge pull request #394 from xtitter/varimport
better error message when importing (into a variable)pull/3/merge
commit
fb2d22ca6b
10
objects.js
10
objects.js
|
@ -6466,11 +6466,11 @@ WatcherMorph.prototype.userMenu = function () {
|
|||
document.body.removeChild(inp);
|
||||
ide.filePicker = null;
|
||||
if (inp.files.length > 0) {
|
||||
for (i = 0; i < inp.files.length; i += 1) {
|
||||
file = inp.files[i];
|
||||
if (file.type.indexOf("text") === 0) {
|
||||
readText(file);
|
||||
}
|
||||
file = inp.files[inp.files.length - 1];
|
||||
if (file.type.indexOf("text") === 0) {
|
||||
readText(file);
|
||||
} else {
|
||||
ide.inform("Unable to import", "Snap! can only import \"text\" files.\n You selected a file of type \"" + file.type + "\".");
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Ładowanie…
Reference in New Issue