Adding upgraders to versioning.js

When adding an upgrader to this file, is there anything else that must be done besides adding to the dictionary Blockly.Versioning.AllUpgradeMaps? I have added the following upgrader for the Notifier component, but when I import an aia project that has the ShowTextDialog method, the parameter that I added still starts blank.

Hello!

There are two other places you need to modify. In the YaVersion.java file you need to find the NOTIFIER_COMPONENT_VERSION and bump it from 6 to 7. Then in the YoungAndroidFormUpgrader.java you need to find the method which upgrades the notifier, and make sure that if the srcCompVersion is < 7 it gets bumped to 7.

I hope that helps!

You'll also need to bump YOUNG_ANDROID_VERSION if you're attempting to upgrade a saved project. When the project is opened, its YaVersion number is checked against that constant and any upgrade is executed if they are different.

1 Like