kopia lustrzana https://github.com/backface/turtlestitch
added "open anyway?" option to "unable to import" dialog for variables
rodzic
4c4a676f4f
commit
287764bfea
|
@ -5,6 +5,7 @@
|
||||||
* Objects: Cache stage>>penTrailsMorph to optimize collision detection
|
* Objects: Cache stage>>penTrailsMorph to optimize collision detection
|
||||||
* Objects: Fixed a collision detection errror when objects are sub-pixel sized
|
* Objects: Fixed a collision detection errror when objects are sub-pixel sized
|
||||||
* Objects: made importing files into variable watchers more lenient wrt to file types
|
* Objects: made importing files into variable watchers more lenient wrt to file types
|
||||||
|
* Objects: added "open anyway?" option to "unable to import" dialog for variables
|
||||||
|
|
||||||
## v4.2.2.8
|
## v4.2.2.8
|
||||||
### 2018-11-21
|
### 2018-11-21
|
||||||
|
|
|
@ -9616,13 +9616,16 @@ WatcherMorph.prototype.userMenu = function () {
|
||||||
function () {
|
function () {
|
||||||
var file;
|
var file;
|
||||||
|
|
||||||
function txtOnlyMsg(ftype) {
|
function txtOnlyMsg(ftype, anyway) {
|
||||||
ide.inform(
|
ide.confirm(
|
||||||
|
localize(
|
||||||
|
'Snap! can only import "text" files.\n' +
|
||||||
|
'You selected a file of type "' +
|
||||||
|
ftype +
|
||||||
|
'".'
|
||||||
|
) + '\n\n' + localize('Open anyway?'),
|
||||||
'Unable to import',
|
'Unable to import',
|
||||||
'Snap! can only import "text" files.\n' +
|
anyway // callback
|
||||||
'You selected a file of type "' +
|
|
||||||
ftype +
|
|
||||||
'".'
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9636,7 +9639,10 @@ WatcherMorph.prototype.userMenu = function () {
|
||||||
};
|
};
|
||||||
|
|
||||||
if (aFile.type.indexOf("text") === -1) {
|
if (aFile.type.indexOf("text") === -1) {
|
||||||
txtOnlyMsg(aFile.type);
|
txtOnlyMsg(
|
||||||
|
aFile.type,
|
||||||
|
function () {frd.readAsText(aFile); }
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
frd.readAsText(aFile);
|
frd.readAsText(aFile);
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue