File IO system doesn't work when plugin is run from MuseScore

• Nov 7, 2015 - 17:23

Hi. I have this problem. I have the JSON file on disk and when plugin starts the data from file should be parsed to array. Here is a fragment of code.

import FileIO 1.0

FileIO {
id: dataFile
onError: console.log(msg)
}
property var array: []

function loadData() {
dataFile.setSource("D:/test.txt");
array = JSON.parse(dataFile.read())
}
onRun: {
loadData();
}

When I run it in plugin creator mode, it works! Proper outputs to console etc. But when I run this plugin from MuseScore plugin manager - it doesn't work. I hope someone can help me.


Comments

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