Jump to content

Achim Kalwa

Members
  • Content Count

    38
  • Joined

  • Last visited

  • Days Won

    1

Achim Kalwa last won the day on October 9

Achim Kalwa had the most liked content!

Community Reputation

35 Excellent

Technical Information

  • Delphi-Version
    Delphi 10.4 Sydney

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Any special alignments of panels and buttons (Bottom, Right)? Can you provide a sample project?
  2. Achim Kalwa

    GExperts 1.3.19 Alpha for Delphi 11

    No, Delphi 11 is not guilty here 😉 There is some code in GX_Configure.pas which looks like some debug leftover: In line 311...316 the dialog is inflated to a minimum of 1000 x 1000 pixel. Remove that code an the configuration dialog will become usable.
  3. Any the should remove that hint after installing the patch. I'm working with several VMs; and sometimes I forget which VM includes the patch and which one still needs the patch. Some information in the About-box would be helpful, too. Delphi 11 Patch 1 still shows <No Updates Installed>.
  4. Achim Kalwa

    Menu captions with images are hard to read under Windows 11

    Yes. And I've reported this issue some weeks ago as RSP-35049. The black text is caused by a bug in Vcl.Menus.pas; procedure DoThemedDrawText(): The parameter "Selected" is completely ignored in that code, but should be used to select to correct theme element details. Feel free to vote for it 😉. But even if this will be (hopefully) fixed in some Delphi 11.1 update I'm still looking for a workaround without using a full copy of Vcl.Menus.pas. Something like patching Vcl.Menus at runtime (using Delphi Detours? Or code from Andreas Hausladen's VCLFixPack?) to replace DoThemedDrawText() with a fixed version (see RSP-35049 for the required changes). Any help appreciated.
  5. Achim Kalwa

    read integer value from database, best practice ?

    Which Database system do you use? Which connection components? If the field in the database is declared as "Integer", it should never contain a Space character. It could be NULL, which means it doesn't contain any value. Most database access components will translate NULL to the value 0, so an empty field should not raise an exception. Which value do you expect in case the field is NULL? To be save, you can test for empty fields yourself: var F : TField; F := Qry.FindField('IntegerField'); if Assigned(F) and (not F.IsNull) then aObject.IntValue := F.AsInteger else aObject.IntValue := -1; // or whatever value you choose in case of an empty field.
  6. Achim Kalwa

    ANN: DDevExtensions is now on GitHub

    I did not encounter any problems. My version is here: https://github.com/kalwados/DDevExtensions Including changes for HighDPI (i.E. Compile Progress Bar) and Darkmode.
  7. Achim Kalwa

    The state of GExperts Support for Delphi 11

    Maybe some of the scaling issues could be solved by setting Form.Scaled := True. I've added procedure TfmBaseForm.Loaded; begin inherited; {$IFDEF IDE_IS_HIDPI_AWARE} Scaled := True; {$ENDIF} end; to TfmBaseForm (GX_BaseForm.pas) (to not edit every dfm by hand). But I am not sure if this works on all inherited forms. My first test with the "Goto" experts are looking good: Achim
  8. Achim Kalwa

    TDBGrid's SelectedRows count

    Watch the grid's indicator column: The current (active) row is marked with a triangle, while selected rows are marked with a dot. If the current row is also a selected row, the indicator shows a dot and a arrow. You need to make the current row a selected row: if DBGrid1.SelectedRows.Count = 0 then DBGrid1.SelectedRows.CurrentRowSelected := True;
  9. Achim Kalwa

    Runtime Error 217 when installing GExperts

    How nice. The issue RSP-33120 has been closed as "test case error" and the comment says:
  10. I can reproduce this, too: start Windows Explorer; if maximized, un-maximize to have a nice window. start RAD Studio/Delphi. if maximized, un-maximize the IDE. use GExperts -> Open File. Select any a pas file Result: Windows Explorer gets activated and has the input focus. If the Delphi IDE was maximized, you only see that the focus is lost.
  11. Achim Kalwa

    Runtime Error 217 when installing GExperts

    Reported as https://quality.embarcadero.com/browse/RSP-33120 Feel free to vote 😉
  12. I did a clean install of Delphi 10.4.2. One of the first steps is to compile and install GExperts. SVN revision 3449 compiled fine, but when running the "Register-GExperts-XX104.cmd" it fails with "Runtime error 217 at 50CDB390", followed by "Problem beim Starten von .\GExpertsRS104.dll. Eine DLL-Initialisierungsroutine ist fehlgeschlagen." To trace the error I compiled GExperts in Debug mode, using Debug-DCUs. Then I used Run->Parameters to set "C:\Windows\System32\rundll32.exe" as "Host", and the full path to the compiled GExpertsRS104.dll and ",InstallGExperts" as parameter: Host application: C:\Windows\System32\rundll32.exe Parameters: C:\Full\Path\To\GExpertsRS104.dll,InstallGExperts Now I could debug the installation from within the Delphi IDE. The startup-code InitUnits (in System.pas) initializes all units and calls class constructors; and in Vcl.WinXCtrls.pas it calls a class constructor TSearchBox.Create. This code creates an internal TImageCollection and adds two default images, which finally leads to TWICImage.Create in Vcl.Graphics.pas (Line 10624 ff). The call to CoCreateInstance(CLSID_WICImagingFactory, ...) fails with error code $800401F0 = CO_E_NOTINITIALIZED = 'CoInitialize has not been called' and an exception is raised with message 'Cannot create instance of class CLSID_WICImagingFactory'. To solve this problem, I need to insert CoInitialize(nil) somewhere, and because I won't change VCL and RTL units I had to find another place. Finally I found that the initialization block in GX_GenericUtils.pas is called some steps before the exception is raised, and already uses unit ActiveX, so I placed a CoInitialize(nil) in GX_GenericUtils.pas initialization block. initialization CoInitialize(nil); // this line added Initialize; ... And the error is gone! Finally I could install GExperts into Delphi 10.4.2 😉 [Yes, I know how to use RegEdit]. @dummzeuch : Maybe there is a better place to insert that missing CoInitialize(nil). Also I don't know if that call has side effects on older Delphi versions and should be surrounded by some IFDEFs. Since it is only one line inserted, I did not create a patch. I'm going to report this new VCL bug to quality portal. Thanks for reading, Achim
  13. Achim Kalwa

    Grep broken in SVN after rev. 3383

    Found the reason: GX_GrepSearchExpert in '..\..\source\Grep\GX_GrepSearchExpert.pas', is missing from the dpr files for most Delphi versions except 2007. After adding this unit, Grep Search is available again. Schönen 2. Advent!
  14. Achim Kalwa

    Grep broken in SVN after rev. 3383

    Hello Thomas, I would just like to notice that the "Grep" expert is no longer available due to some changes in SVN rev. 3383 ff. The defined hotkey does nothing, and the menu item is gone. The new Grep submenu has "show Grep results", but no "Grep search".
  15. Achim Kalwa

    Tools API - Changing Key Assignment

    @Carlos Tré I like the "Insert Row Below" feature very much, but I had to remove the Ctrl+Enter binding because that is already used for "Open File at Cursor", which I use regulary; but keeping Shift+Enter. And I translated strings and method names from Portuguese to English 😉
×