Bug report on Harp Pedals Diagram

• May 15, 2016 - 20:21

Here is my text. The error I keep getting is "invalid attached object assignment." Please help! Thank you.

import QtQuick 2.2
import MuseScore 1.0

MuseScore {
menuPath: "Plugins.harppedals"
pluginType: "dialog"

onRun: {
console.log("harppedals");

if (typeof curScore === 'undefined'); {
var cursor = curScore.newCursor();for (var track = 0; track < curScore.ntracks; cursor.track=track) cursor.rewind(0);}// set cursor to first chord/rest

id: window
width:200
height:100

username:HarpPedals
id: column
x : 10
y : 10
Label,
font,pointSize, 14
text: "Select"
}

Column {
width: 200; height: 200
TextInput { id: myTextInput; text: "Harp Pedals" }
Text { text: myTextInput.text }
}
Qt:createComponent; Element:TEXT; TextInput {id: harppedalTextInput; text: "abcdabcd", font, HarpFont}}


Comments

In reply to by Heather Cornelius

You have more problems than merely your last line.

The for-loop on line 9 is not only unnecessary, but also infinite as written now.

The error you're getting is on line 10, where you've written a property-initialization right into the body of the onRun function; this would be the invalid object assignment.

Lines 11 till 16 will trigger the same error.
Lines 17 & 18 make no real sense within the scripting language.
Line 19 then again is an invalid object assignment, because it's part of a function body.

As to what you're trying to achieve with the last line; no clue.

Perhaps you might want to check out the basics of JavaScript (https://developer.mozilla.org/en-US/docs/Web/JavaScript) as that is the basic language used for QML plugins.

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