Backward compatibilty tip

Post your Gambas programming questions here.
Post Reply
User avatar
Posts: 653
Joined: Thursday 23rd July 2020 5:20pm

Backward compatibilty tip

Post by BruceSteers » Wednesday 16th September 2020 10:37pm

I had an issue with upgrading to the latest Gambas 3.15.

My biggest concern was that for some upgrading from the mainstream versions (3.12 on Debian, 3.14 on Ubuntu) to the latest might be a bit of a challenge and my programs would not work for them if compiled on the latest 3.15.

If running a 3.15 application on a gambas 3.12 environment the application fails to launch and states a bytecode error and that you must upgrade gambas.

Luckily Benoit gave me a tip i thought i could share with you...

Open up the Project Properties page in the IDE and select the "Environment" tab
Click insert and add a new variable..

Set it to the minimal version gambas you require , i'm not sure what the lowest version mainstream version there is out there, 3.12 is pretty low on Debian.
Downside is to ensure your app has no code too modern for the selected version., none of mine have any hugely modern code and work on 3.4 so i guess the trick is to find the balance between the lowest version everyone else may have but not too low you'll have code that will fail on those versions.

Plus side is your app will work on versions of gambas lower than the latest upgrade.
The variable setting is unique to each project so can be set as per requirement.
enviro.png (48.43 KiB) Viewed 1646 times
Hope that may help some :)
Wishing well

If at first you don't succeed , try it differently.

Post Reply