Jump to content

Lars Fosdal

Administrators
  • Content Count

    3303
  • Joined

  • Last visited

  • Days Won

    110

Posts posted by Lars Fosdal


  1. Personally, I wouldn't use a visual component as the core.  It binds you to just one of the many platforms such a comms lib could be used on.

    Once you have a platform agnostic comms lib, you could base a VCL component on top of it.
     

    Now you just need to document the rest of your functional requirements and add pointers to some actual documentation and examples.

     

    If it looks interesting enough, maybe someone will take on the task.

     

    Good luck.


  2. 12 hours ago, techdesk said:

    Delphi help desk system

    This is NOT a help desk system. Delphi-PraXiS operates independantly from EMBT and the PEOPLE here are are professional software developers and hobbyists.

    This is a place that exists for users of Delphi to discuss the challenges they have when developing in the language.

     

    Any discussion needs clearly stated and accurate facts about the challenge at hand, for people to be able to contribute with suggestions for a solution. Lack of such detailed facts, will lead to requests for more facts, and AI generated bulldroppings are generally not considered to be facts.
     

    12 hours ago, techdesk said:

    Make a standalone program with a Form, Button and Memo with STM32CUBE IDE.

    We still have no clue to what this actually does or how it is supposed to work. We are not mind readers.

    • Draw a mockup of how you imagine this to look  
    • Describe the functionality in detail 
    • What that Button does
    • What is shown or entered in the Memo

    Just dropping a product name does not enlighten us at all.  We've likely never used the product and have no clue what it does or how it is supposed to work.

    • Like 2

  3. Have you compared the code for the event handler method with the declaration in the StringGrid class that has the event property?

     

    It sounds really weird that the event handler lost it's code, though.


  4. @Ron Schuster

    You can explicitly control which driver you want to use.

    I use this code to pick my faves.

    class function TPSDFireDatabasePoolMSSQL.FindBestDriver(const Link: TFDPhysMSSQLDriverLink): String;
    const // Constants copied from implementation section of FireDAC.Phys.MSSQL
      C_SQL_SERVER = 'SQL Server'; // DO NOT TRANSLATE
      C_2019_ODBC = 'ODBC DRIVER 19 FOR SQL SERVER'; // DO NOT TRANSLATE
      C_2018_ODBC = 'ODBC DRIVER 18 FOR SQL SERVER'; // DO NOT TRANSLATE
      C_2017_ODBC = 'ODBC DRIVER 17 FOR SQL SERVER'; // DO NOT TRANSLATE
      C_2016_ODBC = 'ODBC DRIVER 13 FOR SQL SERVER'; // DO NOT TRANSLATE
      C_2012_ODBC = 'ODBC DRIVER 11 FOR SQL SERVER'; // DO NOT TRANSLATE
    {$IFDEF POSIX}
      C_FreeTDS = 'FreeTDS';
    {$ENDIF}
    {$IFDEF MSWINDOWS}
      C_2012_NC = 'SQL SERVER NATIVE CLIENT 11.0'; // DO NOT TRANSLATE
    {$ENDIF}
    var
      DriverList : TStringList;
      WantedList : TArray<String>;
      Driver: string;
    begin
      Result := ''; // Blank = Default
    
      WantedList := {$IFDEF MSWINDOWS}
                      {$IFDEF SQLNative}
                        [C_2012_NC, C_2017_ODBC, C_2016_ODBC, C_2012_ODBC]
                      {$ELSE}
                        [C_2018_ODBC, C_2017_ODBC, C_2016_ODBC, C_2012_NC, C_2012_ODBC]
                     {$ENDIF}
                   {$ENDIF}
                   {$IFDEF POSIX}
                     [C_2018_ODBC, C_2017_ODBC, C_2016_ODBC, C_2012_ODBC, C_FreeTDS]
                   {$ENDIF};
    
      DriverList := TStringList.Create;
      try
        Link.GetDrivers(DriverList);
    
        DebugOut('Available SQL drivers'); // DO NOT TRANSLATE
        for Driver in DriverList
         do DebugOut(' "' + Driver + '"');
    
        for var Wanted in WantedList
         do for Driver in DriverList
          do begin
            if CompareText(Wanted , Driver) = 0
            then begin
              DebugOut('Selected driver: "' + Driver + '"'); // DO NOT TRANSLATE
              BestDriver := Driver;
              Exit(Driver);
            end;
          end;
      finally
        DriverList.Free;
      end;
    end;

    which I then use to configure the connections

    class function TPSDFireDatabasePoolMSSQL.CreateDriverLink(const aOwner: TComponent): TFDPhysDriverLink;
    var
      Res: TFDPhysMSSQLDriverLink;
    begin
      Res := TFDPhysMSSQLDriverLink.Create(aOwner);
      if BestDriver = ''
       then BestDriver := FindBestDriver(Res);
      Res.ODBCDriver := BestDriver;
      Result := Res;
    end;
    

     


  5. 11 minutes ago, JonRobertson said:

    Are there scenarios where designing in HighDPI would be beneficial?

    Not per se. However, the problem is that once you use the DPI aware IDE, the measurements and coordinates in forms are according to your current Windows DPI and scaling settings. Which means that when someone with a different DPI or scaling opens the form, it looks like shit and the changes that someone makes, will again be impacted by their settings. So if two people with two different settings, takes turn in changing a form, you can get a form that keeps on growing or shrinking during the design.

     

    Personally, I would prefer that such a thing doesn't happen - so that I can benefit from HighDPI also in the IDE.

     

    It is not a trivial problem to solve. Pixel perfection becomes very hard once you have to deal with design time as well as runtime scaling.

    • Like 1

  6. 1 hour ago, Lajos Juhász said:

     

    It is not about privacy. it is copyright. Anyone that has invested money into an algorithm and solution would not like to see it to appear inside an AI suggested code. That is one of the reasons why the source code for Microsoft Office is not open sourced.....

    It is about privacy.  It is the lack of proper privacy that causes private code to leak into generated AI code.

     

×