Jump to content

Lars Fosdal

Administrators
  • Content Count

    3521
  • Joined

  • Last visited

  • Days Won

    115

Posts posted by Lars Fosdal


  1. 24 minutes ago, Uwe Raabe said:

    Try with external MSBuild in the project options and select x64 as preferred architecture. Key is to use the 64-bit compiler versions from the bin64 folder. The target platform is almost irrelevant. Only bcc64x got an update with the April patch.

    Yeah, THAT surfaced the dreaded error

    [dcc64 Error] NonNullableConstraint.dpr(41): Type parameter 'T' must be a non-nullable value type

    Half-baked patches are no fun. 

    Edit - Also noticed that the Error ID is lost when using MSBuild.

     


  2. @Anders Melander

    I just tried my example code which failed before the April patch in the 64-bit IDE, targeting 64-bit Windows.
    It no longer stops compiling.

    program NonNullableConstraint;
    
    {$APPTYPE CONSOLE}
    
    {$R *.res}
    
    uses
      System.SysUtils;
    
    type
      TMyClass = class
        function Select<T:Record>(const selector: string):TArray<T>;
      end;
    
      TNotifcationRow = record
      const
        Query = 'SELECT * FROM v_server_notifications';
      public
        Id: Integer;
        Name: String;
        Data: String;
        ByWho: String;
        CreatedWhen: TDateTime;
        function DataAsId: Integer;
      end;
      TServerNotificationArray = TArray<TNotifcationRow>;
    
    { TMyClass }
    
    function TMyClass.Select<T>(const selector: string): TArray<T>;
    begin
    
    end;
    
    procedure Test;
    var
      MyClass: TMyClass;
      Res: TServerNotificationArray;
    begin
      MyClass := TMyClass.Create;
      Res := MyClass.Select<TNotifcationRow>('foo'); // <- E2512 Type parameter 'T' must be a non-nullable value type
    end;
    
    { TNotifcationRow }
    
    function TNotifcationRow.DataAsId: Integer;
    begin
      Result := 0;
    end;
    
    begin
      try
        Test;
      except
        on E: Exception do
          Writeln(E.ClassName, ': ', E.Message);
      end;
    end.

     

    • Thanks 1

  3. Due to the continued abuse, the following functionality will change from this date:

    • Images, links and emojis are generally disabled
    • Text emojis will be allowed
    • Quoting limitations will be enforced to single sentences
    • AI filters will be applied to the posts to moderate strong language, personal attacks, and spam
    • Lack of proper grammar, punctuation and Capitalization will be penalized
    • Humorous comments must achieve a rating of at least 42 to be accepted as humor
    • Cat images will be allowed on Saturdays(no nudes, i.e. cats without hair)
    • Recursive posts will be moved to Posts, Recursive
    • Cursive fonts will be righted
    • Use of blinking fonts for important spam is encouraged
    • Links to Rick Astley music videos are encouraged
    • Haha 10
    • Confused 1

  4.  

    On 3/27/2025 at 1:08 AM, Rolphy Reyes said:

    Is it worth developing ERP-type desktop applications at this time?

    Considering every major ERP vendor is moving to cloud, I would say that the trend is "no". However, these are typically enterprise sized ERP systems.

    There may be a niche for small shop owner ERPs - but there are already tons of these out there, and even some of those are cloud based.


    As soon as you exceed a single user, you are in database territory, and when you talk mobile apps, you definitively are in web service country.

     

    I would suggest that you really research your intended target audience to see if there is a gap where a desktop app could fill a need. 

    I would also suggest that you narrow down and "modularize" your functionality, because the concepts of ERP systems and their near relatives are REALLY far reaching.

    You may suddenly find yourself in Tax, CRM, HR & Salary, document management, EDI and WMS territory.

     

    • Like 2

  5. 25 minutes ago, Remy Lebeau said:

    (Ansi|Unicode|Wide)String are managed types. String[n] (ShortString) is not. But switching to ShortString has its own share of compatibility issues not related to Generics.

    Indeed. The change to 12.3 is really complicating existing code, and although I am not against breaking changes for improving quality, it means that you can't really use 12.3 without rewriting parts of the code.

     

    Since we never did go for 12.0 ,12.1 or 12.2, I suspect our projects will stay on 11.3, since the product has entered the care and maintenance phase.


  6. I see the same in the D12.3 source, but no errors show in the IDE.

    I copied the source to another unit and compiled it and it doesn't care about semi-colons for external function declarations - not even for those with the delayed keyword.

     

    Bug or feature? I don't know, but it certainly is not consistent with the rest of the language.

    • Like 2

  7. 9 minutes ago, Die Holländer said:

    I use Azure cloud with MSSQL (free edition), FireDac and works great. I pay about 5 Euro per month.

    Is there a limit on usage at that price? Can a DB there be accessed from multiple concurrent instances of your app?

×