curScore.path in MS4.5 Plugin
I am trying to use curScore.path in an MS4.5 plugin, as per its use in MS3, but without success.
I have a label on the screen which is initialised to "#" and then, on pressing Import is updated to >curScore.path.
However it displays >undefined.
Has curScore.path been renamed in MS4.5? If so, what is it now called?
(csvPath is a property var of the plugin)
Comments
This property, like others, is no longer available. I don't know if by choice or for neglect, but this is the reality of the latest versions of Musescore. However, even if I don't know how you organized the plugin, I don't think it is essential for the transfer of the 'velocity', you can definitely find some other solution.
In reply to This property, like others,… by ILPEPITO
Thanks. I was going to use the same path as the current score but I guess I'll just have to store the csv file in some other known location. Is there plugin access to the list of folder locations seen in Preferences?
In reply to Thanks. I was going to use… by yonah_ag
It doesn't seem to me, but I could be wrong. Personally I would use the FileIO class provided by the Musescore API for loading or saving files, by manually indicating the file path. It seems to me the simplest solution (and it also works with the latest versions).
In reply to It doesn't seem to me, but I… by ILPEPITO
I am using the FileIO class but I didn't want to hard code a path. Guess I'll have to. I can at least make it an input field so that it can be saved in settings.
In reply to I am using the FileIO class… by yonah_ag
That's what I imagined. You could think of getting the paths from the 'ini' files, which have a fixed position, but I don't know how convenient a solution that is. I see now that also the 'filePath' property (the plugins folder) is unavailable in the new version.