Bugfixes and improvements to gnugettext.pas

 Delphi, dxgettext  Comments Off on Bugfixes and improvements to gnugettext.pas
Dec 292012

Some might know that I have been using and contributing to the GnuGetText for Delphi and C++ Builder project. I just had another look into the gnugettext unit and found that it was rather difficult to understand the logic behind all these if(n)defs that refer to specific Delphi versions and older.

I have now changed the way it works by introducing conditional defines based on compiler / RTL features rather than a range of Delphi versions. These defines are set depending on the Delphi version that supports them. There are currently:

  • dx_has_Unsafe_Warnings
  • dx_has_WideStrings
  • dx_Hinstance_is_Integer
  • dx_NativeInt_is_Integer
  • dx_StringList_has_OwnsObjects
  • dx_GetStrProp_reads_unicode

Also, there was a bug because of the these difficult to read ifdefs regarding the handling of the TStringList.OwnsObjects which exists in Delphi 2009 and later. This should be fixed now as well.

And last but not least I removed a warning when compiling with Delphi XE3.

These changes are in the subversion repository on SourceForge.

Be warned: I have only superficially tested them. If you find a problem with it, please let me know.

 Posted by on 2012-12-29 at 14:46

Experimental GExperts Version 1.37-2012-12-15 released

 Delphi, GExperts  Comments Off on Experimental GExperts Version 1.37-2012-12-15 released
Dec 152012

Ian (whose last name I don’t know, from the email address I guess he’s from Australia) pointed out a bug in the last release: The option “Except single lines” for adding line feeds after then, else, do and : did not work for for … do and while … do loops.

This issue is now fixed. All my unit tests still work, so I have hope I haven’t broken anything else.

Head over to the Experimental GExperts page to download the new version.

 Posted by on 2012-12-15 at 12:58