Getting a good night’s sleep is important

Today, I finally found the time to read up on some rather ancient e-mails. One was from Paolo in the dxgettext mailing list about a bug in gnugettext.pas: With SVN revision 75 and the following, AddDomainForResourceString() has no effect, additional translations are not used. Suggested patch: original code from SVN revision 79: [delphi] function TGnuGettextInstance.LoadResString( … Continue reading Getting a good night’s sleep is important

GExperts Bugfixes

The Unicode issues in GExperts just don't end. Today I fixed three of them: [delphi] procedure bla; begin SomeVar := 3245; // german description with some äöüß to SomeVar SomeVar := 123; SomeQuery.FieldByName('GermanWordWithäöüß').AsString := 'some value'; end; [/delphi] (Yes, I know, this doesn't compile.) Move the cursor to the first occurrence of SomeVar and press … Continue reading GExperts Bugfixes

Access Violation in Delphi 6 or 7 when setting IOTASourceEditor.BlockVisible to True

Note to self: If you get an access violation when setting IOTASourceEditor.BlockVisible to true in Delphi 6 or 7 e.g.: [delphi] procedure GxOtaSelectBlock(const Editor: IOTASourceEditor; const Start, After: TOTACharPos); begin Assert(Assigned(Editor)); Editor.BlockVisible := False; try Editor.BlockType := btNonInclusive; Editor.BlockStart := Start; Editor.BlockAfter := After; finally Editor.BlockVisible := True; // <---- BOOM end; end; [/delphi] Check … Continue reading Access Violation in Delphi 6 or 7 when setting IOTASourceEditor.BlockVisible to True

Find all subdirectories containing xml files on Linux command line

So I don't forget: The following Linux command shows a list of all subdirectories that contain a least one *.xml file: find . -type f -name '*.xml' | sed -r 's|/[^/]+$||' | sort | uniq This finds all xml files where the extension is all lower case. But since many Windows programs upper case it … Continue reading Find all subdirectories containing xml files on Linux command line

Advanced Records in Lazarus / fpc

Note to self: Delphi's Advanced Records are also available in Lazarus / Free Pascal, but only if they have been explicitly enabled with the modeswitch compiler directive: [delphi] unit SomeUnit; {$mode objfpc}{$H+}{$modeswitch advancedrecords} interface type TSomeRecord = record FSomeField: integer; function SomeMethod: integer; end; implementation function TSomeRecord.SomeMethod: integer; begin Result := FSomeField; end; end. [/delphi] … Continue reading Advanced Records in Lazarus / fpc