Jump to content

Lars Fosdal

Administrators
  • Content Count

    3501
  • Joined

  • Last visited

  • Days Won

    115

Everything posted by Lars Fosdal

  1. Lars Fosdal

    Hunting a unit reference

    Peganza is another possible tool to find out which unit that drags in another unit.
  2. @riev96 cglm.ini file will not help you. There is no license info in that file. SLIP files, on the other hand, are personal, and not to be shared.
  3. Lars Fosdal

    Simple LiveBindings usage questions

    Personally, I shun LiveBindings. In my experience, they are slow and fragile. Disclaimer: I haven't tried them since the version of Delphi when they first arrived.
  4. Lars Fosdal

    TFrame versus SubForm

    I've never tried working with subforms, so I can't say much about that.
  5. Lars Fosdal

    TFrame versus SubForm

    Another benefit is that we usually wait with initializing the frames until they are actually used. Saves init time on app startup.
  6. Lars Fosdal

    TFrame versus SubForm

    We use a lot of frames, but we almost always instantiate, reparent and connect them at runtime. Usually, we have a panel as a "host" for the frame, which lets the panel deal with the in-form alignment, so that the frame can use alClient. As @Davide Angeli mentions, loss of events has been a key factor for deciding to do it that way.
  7. Lars Fosdal

    company search tools question

    MS Copilot might be able, but, yeah, elbow grease FTW.
  8. Lars Fosdal

    Delphi and "Use only memory safe languages"

    That feels almost like you're advocating the use of FreeAndNil 😄
  9. Which again makes me wonder why not SELECT SUM(Field1) AS Total FROM YourSourceView but as mentioned, I suspect the example differs from the real world need...
  10. Doh, you are right, Uwe!
  11. Not sure if Totalling fields is the best example for the use case, as that is far more efficient to do in the queries By API, do you mean the interface section of the class? The challenge is that you need a predictable way to associate the fields with the field name. You could write a routine like this procedure ConnectFields(Query: TDataSet; const Fields: TArray<TField>; const Names: TArray<string>); begin Assert(Length(Fields) = Length(Names), 'Number of fields and number of names must match'); for var ix := 0 to Length(Fields) - 1 do begin Fields[ix] := Query.FieldByName(Names[ix]); if not Assigned(Fields[ix]) then raise Exception.Create(Format('Field %s not found.', [Names[ix]]); end; end // usage var Field1, Field2, Field3, Field4: TField; begin ConnectFields(Query, [ Field1, Field2, Field3, Field4], ['Field1', 'Field2', 'Field3', 'Field4']); ... which doesn't save you that much code, really.
  12. Are you doing this within a class or multitude of classes, or is it within a method or multitude of methods? Is TField your own class?
  13. So it is not about visual use? If not, I need to understand more about how the TFields will be used.
  14. There are many ways to do this. Will you need to reference the TField components in any way, or are they just for display or editing? Will there be a need for different data format handing for different fields? Different titles, sizes, validation, etc?
  15. Lars Fosdal

    Hyper-V server as host for 3 VMS

    I got a Lenovo P16 (i7)64Gb/ 1TB+500GB Workstation Laptop, and run "corporate" Windows 10 latest patches on the WS and Win11 Pro on a Hyper-V VM. This machine is my regular work machine and it runs an SQL Server instance on the primary OS as well. I also have a private MacBook Pro M1 16" with 32GB and 2TB, running Parallels and Win 11 for ARM on a VM, and RHEL on a VM. Delphi installs and runs just fine on both Win 11 VMs. Interestingly, the MBP is faster than the P16 for the VMs, staying cool and silent, while the P16 spins up the fans like a turbine. I haven't tried dongles on my VMs, since signing happens on the corporate build server, but both VM hosts can pass through USB ports, so I would expect it to work.
  16. Lars Fosdal

    company search tools question

    In theory, the AIs might be able to pull out such data.
  17. Lars Fosdal

    What new features would you like to see in Delphi 13?

    We all know maturity is not related to age 😏 I am living proof of that. 😜
  18. Lars Fosdal

    What new features would you like to see in Delphi 13?

    Valid points. I too wish FMX was on a better maturity level.
  19. Lars Fosdal

    What new features would you like to see in Delphi 13?

    He specified for VCL. Why would you try to shoehorn 3D graphics into a 2D framework?
  20. Lars Fosdal

    company search tools question

    @David Schwartz I assume there are paid services out there that offer such data. How many businesses are we talking about? If it is a limited number, it might be just as cheap to have someone google and register.
  21. Lars Fosdal

    What new features would you like to see in Delphi 13?

    @shineworld 2. I assume you meant "refactoring", not "refractory"? 3/4. Why not simply use GExperts? 5. Why not use a tool like Continua CI for setting version for multiple projects at once? Added bonus - compile, package, distribute automatically on commit to git. 6. FMX already has that covered? 7. ActiveX doesn't work well on other platforms than Windows
  22. @techdesk https://www.archbee.com/blog/technical-specification Without a definition / specification, every software project becomes an endless series of misunderstandings. A mocked up screenshot alone, hardly represents a specification. If you can't be arsed to really describe in detail what you want, you'll probably never get anyone interested. Courtesy of Copilot
  23. Oddly enough, I implemented a serial modbus protocol in Turbo Pascal over 35 years ago to talk to PLCs. https://github.com/LarsFosdal/DOSTimberDryingKiln/blob/main/source/MODBUS.PAS
  24. 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.
  25. Lars Fosdal

    Determining what driver FireDAC uses for MSSQL connection

    @Ron Schuster - Sometimes, there may be more than one driver installed, and the default one may be one that is less performant.
×