[trunk] r4994, Score.load() and Score.save() fail
In the plugin batch export the Score.save() operation fails, i.e. it returns false (currently not checked for in the plugin, but will be in the next version) and doesn't save the file. Same plugin in 1.1 works just fine.
Tested with trunk r4994 on WinXP SP3
Comments
In the command window created by the nightly.bat I see:
Would we possibly need a new API, Score.export() for this, now that there also is a separate menu entry for this?
Same error when saving mscz.
Actually the Score.open() fails already (went unnoticed as not being checked for, will now). I guess the Score.save() failure is just a logical follow-up error
Edit: even stranger: the Score.open() succedes, I can see it being opened, but the function returns false anyway???
The attached patch works for me on rev. 5004.
Please test it.
save() is fixed. Thanks for the patch.
Note that
bool save(string path, string type, string soundfontPath)
is no more available. Use the one with 2 arguments instead.Open is not yet fixed..
Oh, yes, it is Score.load(), not Score.open(), no idea what made me think otherwise...
But why can't that soundfontPath arg not be used anymore with Score.save()?
(Even if I connetly have no need for this)
Score.save() has been fixed in r5011, if I read the SVN repository correctly... (just so I know which nightly to test against)
Score.load() seems to work since the batchexport plugin is working.
The soundfont method is no more provided by MuseScore core since you can now load more than one soundfont. The whole audio export with one soundfont needs to be coded again.
Well, Score.load() sort of worked: it loaded the Score. But it returned 'false' regardless (and the current batch export plugin doesn't test for this, so it goes unnoticed). Does it return 'true' now? Should we not be testing it in the first place?
The true/false on Score.load() is fixed in r5012.
Outch, that was a strange mistake. How long has it gone unnoticed, i.e. when had it been introduced?
Just to know how usefull it is to check success of Score.load()...
I think it worked fine in 1.1, does it still in 1.2?
And a furter question: is it possible, to determine (and display) why a load() or save() failed?
It was in the trunk so 2.x serie and not 1.X.
There is currently no way to display the error message from the plugin framework. Musescore core provides "readScoreError" but it's not exposed in the plugin framework.
Automatically closed -- issue fixed for 2 weeks with no activity.