Open (filename [ , quiet)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Open (filename [ , quiet)

Martin Marris

In Sibelius 7.1.3, Open (filename [ , quiet) doesn’t seem to work if a batch-plugin plugin tries to open a file saved with a more recent version of Sibelius. Even if you set “quiet” to True, the plugin halts with an “invalid data” message. In other words, although it didn’t display a dialogue warning you about the file being in a more recent version of Sibelius, it apparently tried to open the file anyway, and failed, and instead of looping to the next file, it crashed.

 

I have fixed this by adding an error-checking loop:

 

check = Sibelius.Open(filename, True);

if (check = True)

{

Do stuff …..     

 

Perhaps this behavior also pertained to earlier versions of Sib but I don’t remember such issues. I thought that the whole point of the “quiet” switch was to prevent this kind of issue….

 

Martin

 


_______________________________________________
Plugin-dev mailing list
[hidden email]
http://avid-listsrv1.avid.com/mailman/listinfo/plugin-dev
Reply | Threaded
Open this post in threaded view
|

Re: Open (filename [ , quiet)

Neil Sands

I remember the quiet switch being problematic, though I can't remember the details. But I think the purpose of it is to suppress the dialog but answer yes to the question on it, indicating you want to open it regardless.

In Sibelius, if you try to open a file that's come from a too recent version of Sibelius, you don't get a yes/no dialog to answer yes to, you just get a warning saying it can't be done. So I think the quiet flag in Manuscript isn't intended for that situation.

Neil

On 11 Oct 2015 15:11, "Martin Marris" <[hidden email]> wrote:

In Sibelius 7.1.3, Open (filename [ , quiet) doesn’t seem to work if a batch-plugin plugin tries to open a file saved with a more recent version of Sibelius. Even if you set “quiet” to True, the plugin halts with an “invalid data” message. In other words, although it didn’t display a dialogue warning you about the file being in a more recent version of Sibelius, it apparently tried to open the file anyway, and failed, and instead of looping to the next file, it crashed.

 

I have fixed this by adding an error-checking loop:

 

check = Sibelius.Open(filename, True);

if (check = True)

{

Do stuff …..     

 

Perhaps this behavior also pertained to earlier versions of Sib but I don’t remember such issues. I thought that the whole point of the “quiet” switch was to prevent this kind of issue….

 

Martin

 


_______________________________________________
Plugin-dev mailing list
[hidden email]
http://avid-listsrv1.avid.com/mailman/listinfo/plugin-dev


_______________________________________________
Plugin-dev mailing list
[hidden email]
http://avid-listsrv1.avid.com/mailman/listinfo/plugin-dev
Reply | Threaded
Open this post in threaded view
|

Re: Open (filename [ , quiet)

Bob Zawalich

I agree with Neil that the “too recent version” scenario has no mechanism that would allow you to open the score, so it open has the option to fail. At least it tells you that it failed so you can work around it.

 

I find Close to be more problematic. For one thing you cannot really specify the score to close – it seems to always use the active score, and once you close it you have to figure out what the active score has reverted to.

 

We determined that if you Save a score before closing you will never get the “save changes” method.  I had been trying to create temporary scores that I could dispose of by closing without saving, but the Save message often came up. So in recent (Sib 6, maybe?) versions of Sibelius you can get the File object from a score, save it, close it, and delete the file object to accomplish this.

 

The only real issue is that the temp file will show up on the Recent list, but if you try to use it Sib will tell you the file is not there.

 

If you New a temp file and try to save it, it will not Save even with a file name. I have had success, though by doing SaveAs for such a file, giving it a valid file name and type “Sibl”. You can then acquire the File object using GetFile, then close the score, and delete the file.

 

bob

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Neil Sands
Sent: Sunday, October 11, 2015 7:26 AM
To: A mailing list for Sibelius plug-in developers
Subject: Re: [Plugin-dev] Open (filename [ , quiet)

 

I remember the quiet switch being problematic, though I can't remember the details. But I think the purpose of it is to suppress the dialog but answer yes to the question on it, indicating you want to open it regardless.

In Sibelius, if you try to open a file that's come from a too recent version of Sibelius, you don't get a yes/no dialog to answer yes to, you just get a warning saying it can't be done. So I think the quiet flag in Manuscript isn't intended for that situation.

Neil

On 11 Oct 2015 15:11, "Martin Marris" <[hidden email]> wrote:

In Sibelius 7.1.3, Open (filename [ , quiet) doesn’t seem to work if a batch-plugin plugin tries to open a file saved with a more recent version of Sibelius. Even if you set “quiet” to True, the plugin halts with an “invalid data” message. In other words, although it didn’t display a dialogue warning you about the file being in a more recent version of Sibelius, it apparently tried to open the file anyway, and failed, and instead of looping to the next file, it crashed.

 

I have fixed this by adding an error-checking loop:

 

check = Sibelius.Open(filename, True);

if (check = True)

{

Do stuff …..     

 

Perhaps this behavior also pertained to earlier versions of Sib but I don’t remember such issues. I thought that the whole point of the “quiet” switch was to prevent this kind of issue….

 

Martin

 


_______________________________________________
Plugin-dev mailing list
[hidden email]
http://avid-listsrv1.avid.com/mailman/listinfo/plugin-dev


_______________________________________________
Plugin-dev mailing list
[hidden email]
http://avid-listsrv1.avid.com/mailman/listinfo/plugin-dev