B4J Tutorial [ABMaterial] How to implement a library version lock

Starting with ABMaterial v2.50, there are two version fields in the ABM object. The first reports the version of the library while a second includes the version number in the name.

For example, you’ll find these two fields in ABMaterial v2.50.
B4X:
ABM.Version       ' Reports the library version
ABM.Version250    ' Is unique to v2.50 of the library

The unique version field makes it easy to implement a version lock in your apps by simply referencing the version specific field.
B4X:
Dim VersionLock As String = ABM.Version250     'App locked to ABMaterial v2.50

If you attempt to compile the app against a different version of the library (older or newer) the IDE will report an error. This helps prevent library mixups between multiple customer projects where you may not be ready to upgrade their code base to the latest edition of ABMaterial but still want to experiment.

Here I attempted to compile an app with version 2.51 that was locked to 2.50.

1_abmaterial_version_lock_zpsh9m8nbdf.jpg
 
Last edited:
Top