Jump to content

Uwe Raabe

Members
  • Content Count

    2905
  • Joined

  • Last visited

  • Days Won

    169

Posts posted by Uwe Raabe


  1. Brackets denote a list of unit names forming a group. I use it f.i. for keeping the ToolsApi units together: (ToolsApi,DesignIntf,DCCStrs,DockForm,TabDock)

     

    The example shows a glitch in the TMS unit naming: Adv* followed by (BaseGrid) keeps the TMS Grids unit together.

     

    The other example (ZipForge) is used when a group consists of a single unit name only. Omitting the brackets would take it as a unit scope name instead.

     

     

    • Thanks 1

  2. Unfortunately that is by design as comments in uses clauses are considered not clean.

     

    Background: It is pretty hard to connect the comment to one of the used units - there is too much convention involved with this. Also, line end comments don't play well with grouping and line wrapping.

     

    There are non plans to change this any time soon.


  3. With Delphi 12 the Index type of TList as well as Count has changed from Integer to NativeInt. While this has no effect in 32 bit, with 64 bit it definitely has.

     

    Check all descendants of TList if there are any declarations of properties (f.i. Items) or methods with Index type Integer which act as overloads for the base declarations. Then change these Integer types to NativeInt.

    • Thanks 1

  4. The following code lists 355480 files in less than 15 seconds on my system.

    program TestGetFiles;
    
    {$APPTYPE CONSOLE}
    
    {$R *.res}
    
    uses
      System.SysUtils,
      System.IOUtils,
      System.Diagnostics;
    
    procedure Main;
    begin
      var sw := TStopwatch.StartNew;
      var arr := TDirectory.GetFiles('C:\Windows', '*', TSearchOption.soAllDirectories);
      Writeln(Format('%d Files, %d ms', [Length(arr), sw.ElapsedMilliseconds]));
    end;
    
    begin
      try
        Main;
      except
        on E: Exception do
          Writeln(E.ClassName, ': ', E.Message);
      end;
      Readln;
    end.

     

    The dir command needs a lot of time to display the files, while the Delphi code avoids that.


  5. It may depend on the uses list and its order. The different Stat units register different default values:

    {FireDAC.Phys.SQLiteWrapper.FDEStat}
    initialization
      TSQLiteLib.GLibClasses[slDefault] := TSQLiteLibFDEStat;
      TSQLiteLib.GLibClasses[slFDEStatic] := TSQLiteLibFDEStat;
    
    {FireDAC.Phys.SQLiteWrapper.SSEStat}
    initialization
      TSQLiteLib.GLibClasses[slDefault] := TSQLiteLibSEEStat;
      TSQLiteLib.GLibClasses[slSEEStatic] := TSQLiteLibSEEStat;
    
    {FireDAC.Phys.SQLiteWrapper.Stat}
    initialization
      TSQLiteLib.GLibClasses[slDefault] := TSQLiteLibStat;
      TSQLiteLib.GLibClasses[slStatic] := TSQLiteLibStat;

    Manually adding FireDAC.Phys.SQLiteWrapper.FDEStat to the uses may solve the problem. I'd rather set the mode to an explicit value instead relying on a volatile default.


  6. 6 minutes ago, mvanrijnen said:

    by default they do not have a version in it

    What makes you think so? At least in my standard installation these folders are located under c:\Users\Public\Documents\Embarcadero\Studio\xx.x and c:\Users\<user>\Documents\Embarcadero\Studio\xx.x

    • Like 1

  7. 7 minutes ago, mvanrijnen said:

    Maybe the problem is that the Beta testing is done on "clean" systems only ?

    Most likely, yes, but there are several beta testers having a mixed version setup or even using their productive environment. As @Angus Robertson mentioned, there are other factors involved here that made this slip through.


  8. 17 minutes ago, gioma said:

    But what seems normal to you?

    Embarcadero knows about it and is working on an official solution.

     

    And before someone claims that could have been found during the beta: Most of the GetIt stuff is not available during beta until almost the last day and the majority of beta testers install in a dedicated environment without any prior Delphi version present. Also, not everyone makes use of all what is available in GetIt.

    • Like 1
×