06-14-2013 11:09 AM
I call qmlRegisterType in the main.cpp to register my C++ CustomControl, it worked well with the previous release:
qmlRegisterType<MyImageView>("mypackage.bb10", 1, 0, "MyImageView");
But with the Momentics 10.2 version, any file in QML that use MyImageView is now in red making the build fail with this error:
Type mismatch of value of the 'controls' property. Expecting bb::cascades::Control and found MyImageView
Solved! Go to Solution.
06-18-2013 03:40 AM
06-18-2013 11:56 AM
Not a great workaround, but can you just close your main.cpp, delete the error markers and then build?
06-18-2013 12:35 PM - edited 06-18-2013 12:38 PM
Is there a reason to build for 10.2 (or are you just trying to get ahead of the game? )
Simon, you can still use the new Momentics with the older 10.1 sdk, so no reason to go back to the older Momentics, apart from maybe...
One problem I'm seeing with the new beta is that QML files are showing up blank with no apparent reason and no error message while others work fine.
Apart from this though I've had relatively few problems building to 10.1 on the new beta.
06-19-2013 06:12 AM - edited 06-19-2013 06:39 AM
The new IDE still shows QML errors when building with 10.1. This makes me unwilling to use the new IDE - although my app still builds and runs correctly, have "errors" in the code doesn't fill me with confidence.
06-19-2013 09:48 AM
You can disable qml errors
Preferences > BlackBerry > QML Editor > Errors/Warnings
That is a bit too much for my taste, it is helpful to get an error in qml if you do something wrong.
It took some time to get used to the (incorrect) qml errors in the 10.1 momentics, but 10.2 shows a dozen more and makes it unusable.
06-19-2013 11:50 AM
Setting all Error level to Warning did not change the build status.
But, I think I almost found it. Go to:
Preferences > BlackBerry > QML Editor > QML Code Template
Then add your template, from a existing one (ImageView for exemple).
The QML is still red, but the project now build.
(I stil cannot deploy because the new Momentics is not referring to the embedded JRE but to a too old one.)