[Gambas-user] Gambas 2 -> Gambas 3

Rolf-Werner Eilert eilert-sprachen at ...221...
Thu Feb 19 13:02:40 CET 2009


Benoît Minisini schrieb:
>> Good morning Benoit (and everyone)
>>
>> Just came about a question: When I want to bring my Gambas2 app to
>> Gambas3, will this be as roundabout as it is from Gambas1 to Gambas2?
>> (Creating new forms and converting the code...) Or is it more upward
>> compatible?
>>
>> The reason for asking this is that you told me that you would just
>> maintain bugfixes in Gambas2 and bring changes only to Gambas3. As I'm
>> still maintaining some bigger Gambas1 projects, I would then migrate
>> them to Gambas3 directly rather than having them under Gambas2 - if it's
>> as much work again...
>>
>> Hope I could make clear what I mean...
>>
>> Regards
>>
>> Rolf
>>
> 
> The weirdest thing between Gambas 2 and Gambas 3 at the moment is 
> Desktop.Scale, that is smaller in Gambas 3. 
> 
> Gambas 3 does a little conversion for controls whose W and H <= 3 * 
> Desktop.Scale (it adds one Desktop.Scale), but you have to update all your 
> forms and check them one by one to redesign them.
> 
> There are many other changes in instruction syntax and class interfaces, but I 
> never note them at the moment. Hopefully, they are less changes between Gambas 
> 3 and Gambas 2 than between Gambas 2 and Gambas 1.
> 
> So please try and tell us the result! :-)
> 

Ok, I just fiddled around a bit with the Gambas3 version that still is 
running on my system (must be somewhat a couple of weeks old...).

I have a version of an app I wrote for Gambas1 and converted into 
Gambas2 (not completely yet). But it already runs quite well under 
Gambas2. I just made a copy of it for Gambas3 and tried to open and run it.

The only thing it wants is "#Gambas Form File 3.0" in the header. If 
there is an old "Border = Window.Fixed" from Gambas1, you just have to 
change it to "Resizable = False". Everything else seems to work (but 
probably I won't have all possible cases here...)

Modules don't have a header - but somehow it recognizes them as too old. 
Just one step to do: Add a return and delete it or so, anything you 
want, and save it again: no more trouble.

A first test let the icons appear a little bit too small (you pointed me 
to that). I changed them a bit and everything looks as usual. And it 
runs as expected, at least the few functions I was able to test now.

Of course, this is not a real Gambas3 project as it doesn't benefit of 
all the new possibilities and changes in the language. But it starts 
running and can be changed partly where the new features are desirable.

Rolf




More information about the User mailing list