Jump to content

Kryvich

Members
  • Content Count

    274
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by Kryvich

  1. It's unfair to compare the ancient Delphi 2007 with the relatively new VS 2017. It is not even Unicode compliant.
  2. Rad Studio has the Migration tool. You can use it to backup & restore registry settings, to migrate to newer version of Delphi.
  3. Kryvich

    Feature: ParentFont? Yes, but...

    VCL Per Control Styling is planned for 10.4 (https://community.idera.com/developer-tools/b/blog/posts/get-ready-for-the-10-4-beta-with-update-subscription). Perhaps it will help to solve the problem.
  4. Kryvich

    Feature: ParentFont? Yes, but...

    Why not leave ParentFont property value to default, and modify font settings in Form.OnShow?
  5. Kryvich

    Boolean evaluation

    What is Administrator? Is it a field, or a method (function)? What actual type does this field have?
  6. Kryvich

    Delphi Rio IDE hangs again and again

    I would try to find out when used memory grows in size. After opening a certain form, or after compiling, or after starting the program, or after interrupting of execution Ctrl-F2... Try to temporary disable third party plugins and CodeInsight features (Error insight, Help insight).
  7. Kryvich

    Test your product with UTF-8 beta setting

    Final conclusion after setting of UTF-8 as a default code page for Windows: if your program actively uses ANSI strings with national characters, you cannot just recompile the program and hope that it will work correctly. You will have to carefully check the code, and use AnsiStrings with a code page (i.e. AnsiString(1251)) or RawByteStrings where appropriate.
  8. Kryvich

    Test your product with UTF-8 beta setting

    @Tommi Prami Just a hope. I haven't access to the 10.4 beta. Note: When UTF-8 is used as a default code page in Windows, if you use national characters in a AnsiChar constant, they should be encoded in #$nn format. Otherwise you'll get "W1061 Narrowing given WideChar constant (#$0401) to AnsiChar lost information". program AnsiCharConst; {$APPTYPE CONSOLE} {$R *.res} const AnsiCharYo1: AnsiChar = 'Ё'; AnsiCharYo2: AnsiChar = #$A8; // 'Ё' in ANSI 1251 Code Page; begin Writeln('#', Byte(AnsiCharYo1), ', #', Byte(AnsiCharYo2)); Readln; end. This program shows: "#129, #168".
  9. Kryvich

    Test your product with UTF-8 beta setting

    I think this option is not necessary, if Delphi 10.4 will set UTF-8 encoding by default for all new source files.
  10. Kryvich

    Test your product with UTF-8 beta setting

    It's strange that "Borland" still here in Delphi 10.3.3. 🙂
  11. Kryvich

    Test your product with UTF-8 beta setting

    I have just write a little command line utility to convert your ANSI file to UTF-8. https://github.com/Kryuski/AnsiToUtf8
  12. Kryvich

    Test your product with UTF-8 beta setting

    To support this option, every PAS file in a project should be saved in UTF-8 format (not ANSI!). Otherwise you'll get a bunch of compiler warnings.
  13. Kryvich

    Test your product with UTF-8 beta setting

    Never seen this option. Thanks for the heads up. P.S. Is this done to make non-Unicode programs Unicode-compatible? I think Microsoft was late with this solution for 15 years at least.
  14. Kryvich

    language updates in 10.4?

    @TomDevOps There have been some corner cases, but I think most of them have already been fixed (for ex. https://quality.embarcadero.com/browse/RSP-23417) or will be fixed in 10.4.
  15. In Delphi 10.3.3 it's possible to write: TStaticCheck = class class procedure OverStatic; static; static; static; static; end; I don’t know, is it worth reporting to the issue tracker? The idea is taken from here: System.Generics.Collections.pas, TArray.BinarySearch<T>
  16. While it's OK, I'd suggest to keep constructors as simple as possible. To prevent exceptions while an object is created.
  17. Kryvich

    Overstatic methods

    Overstatic methods cannot be moved to another class. Overstatic methods cannot be modified, only deleted completely. Add "static; static;" to a method to protect your class from coronavirus. P.S. In .NET it is considered an error. https://dotnetfiddle.net/dv8Rfh
  18. Kryvich

    TFDMemTable - how to clear structure?

    mt.Free; mt := TFDMemTable.Create(...);
  19. Kryvich

    Generic class

    @Georgge Bakh FPC approach isn't wrong, but different. Other Points: Let's experiment: will do the specialization manually as the Wiki suggests. program ClassConstTest2; {$APPTYPE CONSOLE} {$R *.res} type TTest1 = class procedure Test(); end; TTest2 = class(TTest1) procedure Test(); end; TTestTest2 = class FTest: TTest2; procedure TestIt(); end; procedure TTestTest2.TestIt(); begin FTest := TTest2.Create(); FTest.Test(); readln; end; procedure TTest1.Test; begin Writeln('TTest1.Test'); end; procedure TTest2.Test; begin Writeln('TTest2.Test'); end; var Test2: TTestTest2; begin Test2 := TTestTest2.Create; Test2.TestIt; end. This code outputs TTest2.Test
  20. Kryvich

    Generic class

    @Attila Kovacs Yes, I've found my errors. (Never programmed generics in C# before). Updated code in C#: https://dotnetfiddle.net/010hlp I should say it has absolutely the same behavior as Delphi's one. Perhaps Free Pascal developers understand Generics a little differently.
  21. Kryvich

    Generic class

    How would you write it in C#? I tried to write it like below, but it doesn't even compile: https://dotnetfiddle.net/OACCH6
  22. I would like to see in some future version of Delphi: Iif operator - a magic function to write compact and effective statements of any type. Class contracts ("require", "ensure" clauses, https://www.elementscompiler.com/elements/oxygene/language.aspx) Nullable types and ":" operator, https://www.elementscompiler.com/elements/oxygene/language.aspx#colonoperator . "await" and "async" clauses for smooth multithreading.
  23. If the topic starter get a new license of CE after every incident than OK, it's possible.
  24. I have never seen a crash of my 10.3.3 CE. But I program Win 32-bit VCL mostly in it. IDE Fix Pack is installed. It's impossible. 1 year is the maximum license term for CE license.
  25. Kryvich

    10.4 Beta with Update Subscription

    @Georgge Bakh Traditions...
×