[Gambas-user] old question: detect gambas version in code

PICCORO McKAY Lenz mckaygerhard at ...626...
Tue Jun 20 19:42:12 CEST 2017


Excelent! thanks tobias

Lenz McKAY Gerardo (PICCORO)
http://qgqlochekone.blogspot.com

2017-06-20 13:05 GMT-04:30 Tobias Boege <taboege at ...626...>:

> On Tue, 20 Jun 2017, PICCORO McKAY Lenz wrote:
> > i want to make a piece of software work in both gambas olders (gambas3 <<
> > 3.5) and gambas newers (gambas >> 3.5.1)
> >
> > by example, the smtp has some changes depending on the version, also the
> > gridview too..
> >
> > example:
> >
> > SMTP was rewriten in 3.6 so Body are not present in 3.5
> > http://gambaswiki.org/wiki/comp/gb.net.smtp/smtpclient/body?nh
> > this makes some of my code not work in embebed devices that does not run
> > modern versions of linux and some libs required by gambas 3.9
> >
> > same behaviour with new rows.selection that are since 3.4
> > http://gambaswiki.org/wiki/comp/gb.qt4/_gridview_rows/selection
> >
> > so there's a way to detect gambas version and paste code respect that?
> (was
> > answered some time ago, but i cannot find the mail)
> >
>
> You can do a run-time check with System.FullVersion [1]. A compile-time
> check is also possible by using the #If preprocessor syntax [2].
>
> Regards,
> Tobi
>
> [1] http://gambaswiki.org/wiki/comp/gb/system/fullversion
> [2] http://gambaswiki.org/wiki/lang/.if
>
> --
> "There's an old saying: Don't change anything... ever!" -- Mr. Monk
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>



More information about the User mailing list