Jump to content

Achim Kalwa

  • Content Count

  • Joined

  • Last visited

Community Reputation

24 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. 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;
  2. 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:
  3. 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.
  4. Achim Kalwa

    Runtime Error 217 when installing GExperts

    Reported as https://quality.embarcadero.com/browse/RSP-33120 Feel free to vote 😉
  5. 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
  6. 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!
  7. 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".
  8. 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 😉
  9. Achim Kalwa

    Tools API - Changing Key Assignment

    Works great, thanks for sharing.
  10. Achim Kalwa

    Tools API - Changing Key Assignment

    @Carlos TréVery interesting; I would like to use that expert, too. What's the name of that expert? Or did you write it yourself and are willing to share the code?
  11. VclSmp is the "Embarcadero Sample Components" package, containing TGauge, TSpinEdit, TSpinButton and others. Do you use any of this components in your package? Or contains you package a unit named "spin.pas?"
  12. Achim Kalwa

    remove ExplicitXxxx properties

    For those on older Delphi versions, there is still Andreas "DDevExtensions", which offers a function to disable the Explicit*-properties when saving the DFM file: https://www.idefixpack.de/blog/ide-tools/ddevextensions/
  13. Achim Kalwa

    remove ExplicitXxxx properties

    In fact first attempt was to integrate this little patch into GExperts. There is already GX_VCLFixPack.pas, which is a slightly modified version of Andreas' VclFixPack.pas. It is currently not in use (disabled by $IFDEF) and needs some cleanup, e.g. remove unused and old Win95 code 🙂. But for a "complete" GX Expert it would be neccessary to have at least an on/off configuration switch in the IDE settings section; but I did not dig deep enough to implement such a thing. And some kind of documentation would be helpful, too. Maybe I'll find some spare time at the weekend for creating a patch to GExperts.
  14. Achim Kalwa

    remove ExplicitXxxx properties

    I know I am late to the party, but you might try the attached package for Delphi 10.4.1. It uses the hooking code from Andreas Hausladen's VclFixPack v1.4 to patch the TControl.DefineProperties method to a modified code, which does not write those Explicit* properties to the DFM file. Unpack the zip archive, open DControlsFix.dpk in Delphi 10.4.1, compile & install. There is nothing to customize. If this package is installed, the patch is active. If you like to get the default behaviour back, just uninstall the package. Use at your own risk 😉 DControlsFix.zip
  15. In the Project Manager do a right-click on the dpk file and choose "install".