Jump to content

Lajos Juhász

Members
  • Content Count

    1073
  • Joined

  • Last visited

  • Days Won

    15

Everything posted by Lajos Juhász

  1. It should be done as the SetActive returns. If You look at the source code SetActive will call Shutdown that will call TerminateAllThreads.
  2. Or make fewer circular references. Moving everything in the code to interface section is wrong. It is well known fact that the uses are only for those units that are required in the interface section, everything else must go into the implementation section. Other crucial thing is to remove the Unit Scope names and in code use only fully qualified unit names. This was important in older versions of Delphi (there were problems with unit name caching).
  3. Lajos Juhász

    Memory leak on parsing json

    FMX or VCL does not matter as Json implementation does not depend on the visual library.
  4. Lajos Juhász

    Memory leak on parsing json

    It does not in my case using Task manager. Before the string is read the working set is 3,752K. Read the string: 4,652K, parsing the json 7,280K, freeandnil - 4676K, when the click method is finished the memory set is back at 3,660K.
  5. Lajos Juhász

    Memory leak on parsing json

    I cannot reproduce the leak using Delphi 12.2
  6. Delphi in order to survive must ASAP include the method to close a modalForm or we will die. As a Quick Fix they should include the class helper for all the existing versions: type TFormHelper = class helper for TCustomForm public procedure EndDialog(PModulResult: TModalResult); end; { TFormHelper } procedure TFormHelper.EndDialog(PModulResult: TModalResult); begin modalResult:=PModulResult; end; I can only hope that somebody from Embarcadero will read this thread and will push these changes directly to the TForm not to require a class helper for such an important issue to be fixed. (For years I was using the modalResult to close modal forms without a single issue. This thread made me realize that Delphi is dying because it does not have such a method.)
  7. Lajos Juhász

    LSP Rant

    Recently I have a different problem when debugging using Delphi, Windows freeze completely. Even the task manager cannot be activated, the only solution is to turn off the laptop using the power button.
  8. Instead of running away from this terrible problem. Anders you should write a class helper to help to solve this gigantic bug in the design. I mean how can we live and use Delphi knowing that it has this very poorly design in the fundamental part of the VCL.
  9. You should write: procedure TTestForm.DBGrid1DblClick(Sender: TObject); begin ModalResult := mrOK; end; There is no need to call Close at all. You can thank later to Delphi for implementing correctly.
  10. Lajos Juhász

    TEdit problem capital letters (Delphi 12, Android)

    Does it change if you change the CharCase from ecUpperCase to ecNormal?
  11. Lajos Juhász

    fmxLinux missing?

    https://blogs.embarcadero.com/eugene-kryukov-father-of-firemonkey-and-incredibly-talented-developer/?utm_source=facebook&utm_medium=social&utm_content=fatherOfFiremonkey
  12. Lajos Juhász

    What is wrong with this component??

    Reading the code I believe it is the: procedure TMyCustomCalendar.CreateWnd; begin inherited CreateWnd; RecreateWnd; // Force the control to redraw and send MCN_GETDAYSTATE end; Why do you want to create windows handle all the time? (just after it was created?)
  13. Since mobile platforms are changing so fast. It really depends at what moment you compare. At anytime the state of Delphi can be better or worse than last time. In 2100 when the mobile platforms are going to be stable like desktop you can expect a better integration with Delphi.
  14. Since mobile platforms are changing so fast. It really depends at what moment you compare. At anytime the state of Delphi can be better or worse than last time. In 2100 when the mobile platforms are going to be stable like desktop you can expect a better integration with Delphi.
  15. Since mobile platforms are changing so fast. It really depends at what moment you compare. At anytime the state of Delphi can be better or worse than last time. In 2100 when the mobile platforms are going to be stable like desktop you can expect a better integration with Delphi.
  16. It was a couple a decade ago when I wrote my previous C code. At that moment x is out of scope You should use sum to hold the result: sum +=myArray[x] cout << "The sum is: " << sum << endl;
  17. Lajos Juhász

    Uploading photos to a web host.

    I believe the 3rd character in the 10th line of your code is wrong. On a more serious note without any details what the server expects and how you tried to connect we can not help.
  18. Lajos Juhász

    DBGrid PickList Change

    You wrote the best solution onChange. With this you might covered some situation. What for the case when instead of key down the user click on the row below or above?
  19. Lajos Juhász

    Problem to save XLSX file with QuickReport

    You will have to debug the code. I've tested on a couple of reports it is working for me.
  20. Lajos Juhász

    Google Pay and Apple Pay

    Mobile platforms are changing very fast. Sometimes it is difficult for Embarcadero to provde a solution in a reasonable time frame when the new requirements are released to be able to continue to compile for new versions. Unfortunately nowdays Delphi support too many platforms. They are playing catch up games against other products. Delphi is by rule almost always way behind.
  21. Lajos Juhász

    My sLineBreak is not working

    It is in lines property,
  22. Lajos Juhász

    XML library for Delphi on Android

    (In theory) you can use the TXMLDocument if you select a cross platform DOM vendor. (https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Using_the_Document_Object_Model)
  23. Lajos Juhász

    Make Bold DBRrid Row Color

    At the second row is not the end of the dataset, eof is going to be true when you call next on the last row. You can check recno or a value of the group field.
  24. Lajos Juhász

    Why doesn't this work?

    procedure TForm1.FormCreate(Sender: TObject); begin Var Boy: string; Girl: string; Couple: string; end; For those who doesn't have a modern compiler. Of course inline var is not a block thus it will produce errors: [dcc32 Error] Unit1.pas(29): E2003 Undeclared identifier: 'Girl' [dcc32 Error] Unit1.pas(29): E2029 '(' expected but ';' found [dcc32 Error] Unit1.pas(30): E2003 Undeclared identifier: 'Couple' [dcc32 Fatal Error] Project1.dpr(5): F2063 Could not compile used unit 'Unit1.pas' Failed
×