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: 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: added "open anyway?" option to "unable to import" dialog for variables
|
||||
|
||||
## v4.2.2.8
|
||||
### 2018-11-21
|
||||
|
|
|
@ -9616,13 +9616,16 @@ WatcherMorph.prototype.userMenu = function () {
|
|||
function () {
|
||||
var file;
|
||||
|
||||
function txtOnlyMsg(ftype) {
|
||||
ide.inform(
|
||||
function txtOnlyMsg(ftype, anyway) {
|
||||
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',
|
||||
'Snap! can only import "text" files.\n' +
|
||||
'You selected a file of type "' +
|
||||
ftype +
|
||||
'".'
|
||||
anyway // callback
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -9636,7 +9639,10 @@ WatcherMorph.prototype.userMenu = function () {
|
|||
};
|
||||
|
||||
if (aFile.type.indexOf("text") === -1) {
|
||||
txtOnlyMsg(aFile.type);
|
||||
txtOnlyMsg(
|
||||
aFile.type,
|
||||
function () {frd.readAsText(aFile); }
|
||||
);
|
||||
} else {
|
||||
frd.readAsText(aFile);
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue