1.2 Plugin Additions

• Mar 17, 2012 - 13:13

This is my understanding of the additions as mentioned in the 1.2 release notes.
curScore.close();
Closes the score.

curScore.version;
Contains the version number of MuseScore which last saved and closed the file eg 906, 10100, 10200.
This is NOT the version of MuseScore currently in use!

curScore.fileVersin;
This always contains 114 so presumably it is related to the current version in use.

Not sure how to detect if there is no current score. After curScore.close() some score properties are still there (eg staves) and others, if accessed, cause MuseScore to stop working (eg measures)

Everyone, comments please.


Comments

In reply to by Jojo-Schmitz

Score Object

n = curScore.parts();
Gives: TypeError: result of expression 'curScore.parts'[4] is not a function.
n = curScore.parts;
Works.
The same applies to measures, pages and keysig.
Are these properties not methods?

Global Variables

curScore.close();
if (typeof curScore === 'undefined') {return;}
Always drops through as the type is still object.
Also the only way I can find to create a file without a score is to remove all the instruements
but Im not sure if this is technically without a score as the type is still object.
If I use close() I can not save the result as Save etc are grayed out.
Under what circumstances can a file be created or left without a score?

Do you still have an unanswered question? Please log in first to post your question.