Jump to content

Lars Fosdal

Administrators
  • Content Count

    3504
  • Joined

  • Last visited

  • Days Won

    115

Everything posted by Lars Fosdal

  1. Lars Fosdal

    Delphi Rio IDE hangs again and again

    Is it mission impossible to disable the data links on forms when not working on them? It would probably mean that you need to add code to activate the connectivity at run-time.
  2. Lars Fosdal

    Delphi Rio IDE hangs again and again

    Are there a lot of forms that have design-time data connections?
  3. Lars Fosdal

    Delphi Rio IDE hangs again and again

    When BDS reaches 1.5Gb - you are usually in an out-of-memory situation, and BDS will behave erratically or most likely not at all. The question then is - what is eating your memory? Are you building multiple projects in a project group?
  4. Lars Fosdal

    Delphi Rio IDE hangs again and again

    Are there any files in your projects that are on a network drive?
  5. https://docs.microsoft.com/en-us/cpp/build/reference/utf-8-set-source-and-executable-character-sets-to-utf-8?view=vs-2019
  6. Lars Fosdal

    Test your product with UTF-8 beta setting

    This could use a QP to expose it in the regular Options dialogs.
  7. Lars Fosdal

    Minimising Mainform but leaving sub forms normal

    What about setting Owner/Parent of the children to nil? (I am just throwing pasta at the wall here now)
  8. Lars Fosdal

    Minimising Mainform but leaving sub forms normal

    One alternative could be to have an permanently invisible main form, so that the perceived mainform also is a child?
  9. Lars Fosdal

    Minimising Mainform but leaving sub forms normal

    I am trying to remember if I've seen this done in any app before, but I am coming up short? What happens to child windows if main window is set invisible, I wonder?
  10. Lars Fosdal

    language updates in 10.4?

    Have anyone done an article on the current pitfalls of inline variables?
  11. The point of making a second class was to enable one of the features that Mike was looking for, i.e. hiding implementation details. The single set field was a single property of the single example Mike initially gave. He later pointed out there are at least four different methods of operation, even adding three-way comparison/merges, meaning you need a third file parameter. You can put these classes in separate units and have a factory method or class that instantiate the specific inner classes, and completely isolate the inner workings from the outer use, offering f.x. two compare methods. function Compare(const aFileName1, aFileName2: string; const aMerge: Boolean = False):TResultType; overload; function Compare(const aFileName1, aFileName2, aFileName3: string; const aMerge: Boolean = False):TResultType; overload; Again, just a simple example based on the limited insight into all the possible variations of parameterization. There is more than one way to solve such a challenge. I chose to use polymorphism and encapsulation.
  12. Please elaborate. How is it worse? How would you solve it?
  13. I like streamable objects. That makes it impractical with params to the constructor. Hence, I try to avoid them.
  14. Having arguments to the constructor is something I try to avoid. TINIComparer = class private fINIFileName1: string; fINIFileName2: string; protected procedure LoadINIFiles; procedure CompareINIFiles; virtual; public constructor Create; virtual; procedure Compare(const aINIFileName1, aINIFileName2: string); end; TIniComparer2Way = Class(TIniComparer) protected procedure CompareINIFiles; override; // if necessary public constructor Create; override; end; constructor TINIComparer.Create; begin Inherited; end; constructor TINIComparer.Compare(const aINIFileName1, aINIFileName2: string); begin fINIFileName1 := aINIFileName1; fINIFileName2 := aINIFileName2; LoadINIFiles; CompareINIFiles; end; constructor TINIComparer2Way.Create; begin Inherited; fCompareType := cmt2WayCompare; end; // from main form: fINIComparer := TINIComparer2Way.Create; fIniComparer.Compare(edtINIFilename1.Text, edtINIFilename2.Text)
  15. Lars Fosdal

    TFDMemTable - how to clear structure?

    There are various ClearXxx methods for TFDMemTable, but it is not obvious which one(s) to call, or in which order, and if they actually reset the whole thing. The above suggestions, on the other hand, are solid.
  16. Lars Fosdal

    TFDMemTable - how to clear structure?

    Free/Create ?
  17. Lars Fosdal

    Internationalized Domain Names (IDN)

    This one redirects: http://welcometothe.中国
  18. Lars Fosdal

    Internationalized Domain Names (IDN)

    I see many Norwegian sites simply do a redirect on the IDN URL to a non-IDN version of it. As for Chinese - here is a slew: https://www.101domain.com/chinese-simplified_idn_domains.htm Edit: Err... where you can register a slew
  19. Lars Fosdal

    BDE Enterprise installer and Windows 10

    Hmm... Wasn't these installer modules - i.e. .msm files? What about PowerShell> Get-ChildItem 'c:\program files (x86)\' -include BDE*.ms* -Recurse
  20. Lars Fosdal

    BDE Enterprise installer and Windows 10

    I can't find anything BDE but those Delphi version specific variants of the one you mention in my registered user downloads. Have you tried crawling all of your disk for BDE*.msi ? PowerShell> Get-ChildItem c:\ -include *.msi -Recurse I suspect adapting to FireDAC may actually be easier than fighting with the ancient BDE.
  21. I try to ensure that all my text files have a BOM and are encoded as UTF-8.
  22. Lars Fosdal

    language updates in 10.4?

    Optimism is underappreciated. 🖖
  23. Lars Fosdal

    language updates in 10.4?

    No feature freeze until Delphi Antarctica
  24. Lars Fosdal

    Address and port are already in use error after TIdHttp.Get

    Do you have the http.request.connection set to 'keep-alive'? I've seen posts that indicate that it will prevent dropping the port. https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Keep-Alive - There are options to limit the life time / number of uses. Is the TIdHttp properly disposed of? Did you try something like TCPView (https://docs.microsoft.com/en-us/sysinternals/downloads/tcpview) to find out what holds the endpoints?
  25. Lars Fosdal

    language updates in 10.4?

    I am really looking forward to nullable base types. Variants sort of work, but you have to write a lot of checking code that could be made less complex with nullables + operators + validation. Some food for thought here: https://developers.redhat.com/blog/2020/03/05/c-8-nullable-reference-types/
×