BlackBerry just added a pretty sweet feature to their Momentics IDE for BlackBerry 10 Cascades developers. They have added live QML editing. That means you can edit the QML files for an app while it is running on your device so you can immediately test changes. They had been talking about this possibility for awhile but now it is here! Video of it in action here:
Check out the details here or read the instructions below:
- First, make sure you update your Momentics IDE to version 2.0 available here and your BlackBerry 10 Native SDK API level to 10.2 as described here.
- Next, in the Momentics IDE enable the Cascades Development Support feature by going in Windows to Window->Preferences > BlackBerry > check the “Send QML files to device on save” checkbox.
- Next, add some relevant code to your Cascades project that basically listens for changes in the QML files in the assets folder and sends the updated files to the running app on the device. You can do this in one of two ways: by adding some code snippets to your ApplicationUI class as explained on the DevelopmentSupport API documentation, or by adding and creating an instance of the stand-alone QMLBeam custom class available through the DevSupportTemplate sample available on Github. For the details on how to use this template in your app, checkout the new documentation section on Updating QML live on a target.
- Finally, compile and run your application. Et voilà! Any updates you make to your QML assets will now show instantly to your running app with a click of the “Save” button.