How do you merge Gambas project code?
Posted: Wednesday 6th January 2021 6:25am
A few days ago I received some input on my project from Charlie (cogier) in the form of an oven-ready project example. I had to look through the project and determine which changes to make to my current version in order to adopt the suggested improvements.
In a non-visual language like C or Gambas Script, it is relatively easy to open source files using Linux tools like Meld and quickly determine the differences. But in my case there were only 2 lines of 'code' that differed between the two versions. However, there were also 8 additional visual components, and as they were containers, all of the existing controls had to be cut from the form and pasted into these new controls. And then there were the Properties dialogs which held numerous non-default settings.
It occurs to me now that I could probably have done a file compare with the .Form source files (I'll probably have a play with that idea later), but I was just wondering; how do other Gambasers tackle this problem?
This is a screenshot of a .Form compare on Meld.
I'm guessing that just by editing this file, all controls, their properties and their position in the hierarchy will come good!
In a non-visual language like C or Gambas Script, it is relatively easy to open source files using Linux tools like Meld and quickly determine the differences. But in my case there were only 2 lines of 'code' that differed between the two versions. However, there were also 8 additional visual components, and as they were containers, all of the existing controls had to be cut from the form and pasted into these new controls. And then there were the Properties dialogs which held numerous non-default settings.
It occurs to me now that I could probably have done a file compare with the .Form source files (I'll probably have a play with that idea later), but I was just wondering; how do other Gambasers tackle this problem?
This is a screenshot of a .Form compare on Meld.
I'm guessing that just by editing this file, all controls, their properties and their position in the hierarchy will come good!