cursor.isChord() is not a method, even though the handbook says it is.
I've attached the Musescore plugin I wrote, if you run it from the plugin creator, then you'll get a message similar to this:
16:-1: TypeError: Property 'isChord' of object Ms::PluginAPI::Cursor(0x1e54d040) is not a function
Warning: :16: TypeError: Property 'isChord' of object Ms::PluginAPI::Cursor(0x1e54d040) is not a function
Thank you in advance.
Attachment | Size |
---|---|
cursortest.qml | 925 bytes |
Comments
Where did you find this in the handbook? The actual Handbook page for plugins is this one with the corresponding Doxygen-generated documentation for its API located here.
As for your example, to check whether the element at cursor exists and whether it is a chord something like this should be used:
In reply to Where did you find this in… by dmitrio95
Thank you for the links, they helped me very much.
My problem was that I was using the handbook for 1.x. instead of 3.x.
Thank you guys so much!
https://musescore.org/en/plugin-development/cursor-object#bool-isChord() is the documentation for 1.x plugins and as such very outdated
In reply to https://musescore.org/en… by Jojo-Schmitz
Thank you so much! I never noticed that near the very top of https://musescore.org/en/plugin-development it says: "This documentation applies to plugins for 1.x only!"