Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MS Ver 4.4 plug-in compatibility #22606

Closed
TeeDeeY opened this issue Apr 27, 2024 · 2 comments
Closed

MS Ver 4.4 plug-in compatibility #22606

TeeDeeY opened this issue Apr 27, 2024 · 2 comments
Labels
feature request Used to suggest improvements or new capabilities

Comments

@TeeDeeY
Copy link

TeeDeeY commented Apr 27, 2024

Your idea

Change version 4.4 plugin use of “title” so some plug-ins can be compatible from 3.6 to 4.4+. Possibly create a default title like done in version 4.2 if no title is given. Then, ask plug-in writers to not use title and allow musescore to always assign it. Also, allow menuPath in future MS versions, even if you ignore it.

Problem to be solved

Leaving off “title:” in MS 4.4 causes problems (loading and plugin menu listing). In 3.6, using “title:” can keep a plug-in from loading. 3.6 requires menuPath.

I thought MS 4.4 had a problem with menuPath but it seems fine while using a currently nightly. I need to recheck. MS 4.2 complains but worked with it.

I tried using Component.onCompleted to assign title, but couldn’t get it to properly assign title in MS 4.4 but that could be due to my incorrect usage. There is a component load method that may work but I wanted to start this suggestion and maybe a solution already exists.

Prior art

No response

Additional context

It would be nice if a simple plugin could work across all the versions. I am almost there but the MS 4.4 title requirement keeps compatibility from happening. MS 3.6 hates title declarations.

@muse-bot muse-bot added the feature request Used to suggest improvements or new capabilities label Apr 27, 2024
@TeeDeeY TeeDeeY closed this as completed Apr 27, 2024
@TeeDeeY
Copy link
Author

TeeDeeY commented Apr 27, 2024

MS 4.4 and 4.2 have different assignment styles for title (in onCompleted). It seemed that one type would not work for both, but this seems to work (or I'm sleepy). Using a starting declaration of 'title: "TITLE"' when setting id, etc. works with both versions, but in the onCompleted section, it worked differently for me.

Component.onCompleted: {
if (mscoreMajorVersion >= 4) {
if (mscoreMinorVersion >= 4) {
title: "TITLE_HELLO 4.4"
// note: title="TITLE" doesn't work and causes menu to say "Run plugin ()", but the plugin does run.
// also, make sure the ":" after "title" is connected, as in "title:". "title : " doesn't work.
} else {
title=qsTr("TITLE-HELLO");
}
} else {
}

}

to summarize, this allows a plug-in to not have an initial title declaration. Then, MS 3.6 will be able to use the same plugin.

@Jojo-Schmitz
Copy link
Contributor

See also https://musescore.org/en/node/337468#Tips-for-adapting-plugins-for-4.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Used to suggest improvements or new capabilities
Projects
None yet
Development

No branches or pull requests

3 participants