MoI discussion forum
MoI discussion forum

Full Version: Failed to Save.

Show messages: All  1-7  8-13

From: Mindset (IGNITER)
21 Feb 2015   [#8]
Never scripted on the form before... but...
Might something like this work?

myActiveXObject = new ActiveXObject("Scripting.FileSystemObject");
try {
file = myActiveXObject.GetFile(doc);
}
catch(err) {
moi.ui.alert(err.message);
}


var before = file.DateLastModified;
moi.geometryDatabase.save();
if (before == file.DateLastModified)
{
var msg = 'Failed to Save:\n\t' + doc
moi.ui.alert(msg);
}


I don't really know how to handle an error and get out cleanly.... just hope maybe this is a worthy attempt.
From: Michael Gibson
21 Feb 2015   [#9] In reply to [#8]
Hi Mindset - something like that could work but unfortunately there tends to be security problems with using Scripting.FileSystemObject on newer Windows versions, and it's not present at all on the Mac.

I don't think it's easily solved by scripting alone, for v4 I will be adding support for catching writing failures directly into the file writing code.

- Michael
From: Mindset (IGNITER)
21 Feb 2015   [#10] In reply to [#9]
Thank you Sir.
From: Mindset (IGNITER)
7 Dec 2017   [#11] In reply to [#3]
Hello Michael,

I am wondering if the "pop up an error message" feature for an unsuccessful model-file Save made it into V4?

BTW...
I love your software.
It is the best intangible product since the Beatles.
-- MindSet
From: pixelhouse
7 Dec 2017   [#12] In reply to [#11]
Hi Mindset,

try to open an instance of Moi and copy the file to the instance and save the scene.
Hope it works!
From: Michael Gibson
7 Dec 2017   [#13] In reply to [#11]
Hi Mindset,

> I am wondering if the "pop up an error message" feature for an unsuccessful
> model-file Save made it into V4?

Not quite yet but it shouldn't be much longer before I'll be able to get to it.

- Michael

Show messages: All  1-7  8-13