Beware: IOTAComponent.GetPropValue needs 4 bytes for an enum

The ToolsAPI interface IOTAComponent declares two methods for getting property values: [delphi] IOTAComponent = interface(IUnknown) // [...] { Given the index or name, returns the property value. The untyped var must be large enough to hold the returned value. If the property is a descendant of TPersistent, the return value is a IOTAComponent. For properties … Continue reading Beware: IOTAComponent.GetPropValue needs 4 bytes for an enum

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