Jump to content

Perpeto

Members
  • Content Count

    16
  • Joined

  • Last visited

Posts posted by Perpeto


  1. I have a test application, where i only have a TColorBox-Component. If I change the style in any way, it takes ~20ms to initialise. In Delphi11 it's faster than in Delphi12, because Delphi12 has more Colors in "System.UIConsts".

    In our "real" application we do have some dialogs with 20 or more coloroboxes, which adds up to 700ms per Dialog only to initialize those colorboxes. 

     

    We assume, that the issue is in TCustomColorBox.PopulateList or more preciseley "TCustomColorBox.ColorCallBack".

    Does anyone have tips how to speed things up or what i do wrong here?

     

    Thanks!

    unit colorbox_performance;
    
    interface
    
    uses
      Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
      Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ExtCtrls;
    
    type
      TForm22 = class(TForm)
        ColorBox1: TColorBox;
        procedure FormShow(Sender: TObject);
      end;
    
    var
      Form22: TForm22;
    
    implementation
    
    uses
      diagnostics;
    
    {$R *.dfm}
    
    { TForm22 }
    procedure TForm22.FormShow(Sender: TObject);
    begin
      var StopWatch := TStopwatch.StartNew;
      ColorBox1.Style := ColorBox1.Style - [cbStandardColors];
      ShowMessage(format('%dms', [round(StopWatch.Elapsed.TotalMilliseconds)]));
    end;

    .


  2. 1. Add TNumberbox anywhere

    2. Set Mode to "nbmFloat"

    3. Enter a negative Number like "-1.234"

    4. Select whole number and press "-" ... nothing happens, besides it would override the value

     

    Imo the issue is here:

    function TCustomNumberBox.IsValidChar(AKey: Char): Boolean;
    begin
    ..
    if (AKey = '-') and ((SelStart <> 0) or LText.Contains('-')) then
          Result := False
    ..
    end;

    It tests, if the string already has an "-". But it does not test, if the whole string is selected, i.e. the user wants to override the whole value.

     

    Can anyone reproduce this too or tell me, if I am wrong? Otherwise I would create a bug report for this. Thanks!


  3. Hallo everyone,

    has anyone tried the official "DelphiLSP" Plugin for Visual Studio Code (https://marketplace.visualstudio.com/items?itemName=EmbarcaderoTechnologies.delphilsp) yet?

    Some time ago I have used OmniPascal (http://blog.omnipascal.com/)  by Christopher Wosinski and the code completion has already worked better than in Delphi IDE. So I have hope in the official "DelphiLSP", so that I can use Visual Studio Code instead of the Delphi-IDE at least for "just programming", i.e. no Forms etc.

     

    Or does the official plugin has the same "code completion"-issues as in the Delphi IDE ?

    • Like 1

  4. On 3/3/2021 at 11:19 AM, PeterPanettone said:

    The Editor now shows the Error Insight information for the current unit in the Status Bar:

     

    image.png.b97b740d7a28c08fdbabec87a7fe1aa6.png

     

    This is very nice and useful! Thank you, Embarcadero!

     

    Does not work for me properly. If I start a new project form scratch it works just fine. But if I load a "real world" project, it neither underlines the warning/hint nor states it in the status-bar at the bottom.. even if I recompile the whole project... 😞 it would've been such a nice feature


  5. Hallo everyone,

     

    the "Quick Access" or "Quick Search" is really slow for me in 10.3 Rio. If I type something, it takes like 5 to 10 seconds until it shows the results. In previous versions it has showed them instant, i.e. "quick". For now Ive switched to STRG+F12 to search for units. Nonetheless Ive really liked or at least get used to use the quick access search bar in the past releases.

     

    image.png.b075bd7e9c9c46f1a9d7766e5f6e670c.png

     

    Has anyone experienced the same or is it known, that is now slower? Thanks!

×