12-30-2012 08:45 PM - edited 12-30-2012 08:48 PM
I was wrong about "new TestApp(&app)" line - it was perfectly fine. Updated the post.
I've tried to run the project on device & checked the logs:
Dec 31 05:34:38.515 [...] bb::cascades::QmlDocument: error when loading QML from: QUrl( "file:///apps/[...]/main.qml" )
Dec 31 05:34:38.517 [...] assets//main.qml:39:21: Cannot assign to non-existent property "selectedIndexChanged"
selectedIndexChanged: {
^)
Then changed "selectedIndexChanged: {" to "onSelectedIndexChanged: {"
Also replaced
_TestApp.saveValueFor(style.objectName, style.getSelectedIndex())
with:
_TestApp.saveValueFor(style.objectName, style.selectedIndex)
When using properties in QML "get" is usually omitted.
Now it works! State is saved. ![]()
To check the logs in Target Navigator View right click on device; "Launch SSH session", then run:
slog2info -w
or, to filter spam:
slog2info -w | grep someString
12-30-2012 08:48 PM
Great, thanks!
I wish in qml when you hit the '.' it would show a list of the the possible options rather than me trying to guess. Also wish it would underline these errors.