Jump to content

Uwe Raabe

Members
  • Content Count

    2488
  • Joined

  • Last visited

  • Days Won

    143

Everything posted by Uwe Raabe

  1. Uwe Raabe

    Delphi 12 is available

    The lack of implementing that feature request was the driving force behind writing that article. As long as everybody steps away from designing in High DPI the collected bug reports will only cover the obvious cases but miss the deeper ones. Thus I decided to use the form designer in High DPI for at least one of my projects and see how it goes. Obviously I had to develop a strategy and some workarounds to make it usable in the first place. Publishing it is based on the hope that others also step on that ship and share their findings, too.
  2. You can have this for free: Open MMX properties and navigate to Pascal - Sorting Under Format unit uses clauses check Group and sort uses Now when you format the uses clause (with Ctrl-Alt-U while the cursor is inside a uses clause) MMX does the following: Resolve any unit aliases Resolve all unit scope names Group the units as configured (see below) Compress and wrap each group according to the settings The groups are configured per project in the MMX Project options setting. If the entry for Groups is cleared neither grouping nor sorting is done. Also these Project options have an Auto Format checkbox, which when checked forces the uses clause formatting whenever MMX manipulates a uses clause. My personal preference would be to format the uses clauses without any other changes done to keep version control happy. This can be achieved by a command line tool available on GitHub: UsesCleaner It provides almost the same functionality as MMX, but targets complete projects instead of single units.
  3. Uwe Raabe

    Delphi 12 is available

    Indeed, for me the biggest enhancement is the handling of font sizes regarding dpi changes. This eliminates a plethora of workarounds where fonts are adjusted in height, color or style and thus cannot rely on the ParentFont mechanism. Besides that, there are currently 15 issues I reported in Quality Portal marked fixed in this release. Not that bad.
  4. Uwe Raabe

    Parnassus Bookmarks issue - again.

    Copy the ParnassusCoreEditor.dll from the 22-CatalogRepository as ParnassusCoreEditor_XAlexandria.dll into the c:\Program Files (x86)\Common Files\ParnassusShared\ folder.
  5. Uwe Raabe

    trying to POST multiple values of same parameter

    I guess the problem that these parameters are in the URL query.
  6. Uwe Raabe

    Which Indy version in Delphi 12

    AFAIK it matches the commit from September, 11th 2023 (65ae6909208257e51450be7ec724fd54aedfeba4)
  7. Uwe Raabe

    Delphi 12 is available

    The Delphi 12 release falls in your subscription, thus you are entitled to download, install and use it without any time limit. Nevertheless I recommend to renew your subscription to stay eligible for further updates.
  8. Delphi 12 already has a separate menu item for this unter Tools.
  9. Uwe Raabe

    Code formatting in Delphi 12

    The current implementation of the code formatter is deprecated, probably because it relies on some dotnet code that is going to be thrown out. I expect a proper replacement for the formatter in the future.
  10. Uwe Raabe

    Code formatting in Delphi 12

    AFAIK, the Modeling option is selected by default. So, as long as you don't deselect it...
  11. Uwe Raabe

    trying to POST multiple values of same parameter

    It doesn't even get a name to search for: function TRESTRequestParameterList.AddItem: TRESTRequestParameter; begin Result := Add as TRESTRequestParameter; end;
  12. Uwe Raabe

    trying to POST multiple values of same parameter

    Have you tried using the parameterless AddItem function overload and set the Name, Value and Kind in its result?
  13. Uwe Raabe

    Copy table data between two different databases.

    Regarding speed, the docwiki link states at the end: Depending on the requirements about the restrictions mentioned in the lines above that quote, assigning Data may be the better approach, while CopyDataSet covers a broader use case.
  14. Uwe Raabe

    Copy table data between two different databases.

    If the tables have the same structure it might be as simple as using two TFDTable components with their attached connections and call CopyDataSet on the target one.
  15. You didn't mention the Delphi version, but since Delphi 11 you can use the appropriate Sort overload taking a comparer, start index and count. procedure Sort; overload; procedure Sort(const AComparer: IComparer<T>); overload; procedure Sort(const AComparer: IComparer<T>; Index, Count: Integer); overload;
  16. Seems it already exists: RSP-42131
  17. Uwe Raabe

    Breakpoints do not work.

    If Debug-DCUs is not active there will be no blue dots in the Delphi sources.
  18. Uwe Raabe

    Breakpoints do not work.

    Only when you want to break or step into the Delphi units.
  19. Uwe Raabe

    Memory leak with anonymous methods.

    When I run that code in a vanilla VCL Forms Application in a ButtonClick event - nothing happens. Either commenting out the last line or inserting a Sleep(100) before makes the ShowMessage appear. The problem here is that the anon method captures the variable and not the value. Thus setting the value of TerminateProc to nil has influence of what is passed to TThread.Queue. It heavily depends on the timing of whether the Queue call comes first or the setting to nil. Seems not to be a valid solution to avoid the leak.
  20. Uwe Raabe

    Call for Delphi 12 Support in OpenSource projects.

    There are different levels of beta testers...
  21. Another approach would be to declare a TMessage descendant that the frame (and probably also any form) subscribes to during creation and unsubscribes from on destruction. Then you can broadcast this message when the language changes. uses System.Messaging; type TLanguageMessage = class(TMessage<string>); ... procedure TMyFrame.HandleLanguageMessage(const Sender: TObject; const M: TMessage); begin var msg := M as TLanguageMessage; SwitchToLanguage(M.Value); end; ... TMyFrame.Create FLanguageMessageID := TMessageManager.DefaultManager.SubscribeToMessage(TLanguageMessage, HandleLanguageMessage); ... TMyFrame.Destroy TMessageManager.DefaultManager.Unsubscribe(TLanguageMessage, FLanguageMessageID, True); ... NotifyLanguage TMessageManager.DefaultManager.SendMessage(nil, TLanguageMessage.Create('DE'));
  22. Uwe Raabe

    Call for Delphi 12 Support in OpenSource projects.

    You mean, that I am part of the beta? That is already known in public IAW Embarcadero: TZipFile Improvements in Delphi 12
  23. Uwe Raabe

    Call for Delphi 12 Support in OpenSource projects.

    During the beta I use private forks of the public repositories to store all the changes. On release date the fork is merged into public. I don't distinguish code I may publish or not.
  24. AFAIK, the TNT Unicode Components were acquired by TMS a couple of years ago, but they are tagged compatible up to Delphi 10.2 now: TMS Unicode Component Pack - looks like they are just abandoned.
  25. Uwe Raabe

    How to remember tests in VCL GUI Logger

    You can always tweak the source of DUnitX.Loggers.GUI.VCL.pas to your needs. Currently the code for saving is located in FormClose. Besides extracting it to a dedicated method, it can be inserted at the beginning of RunExecute. In Contributing.md you find instructions to make your enhancements available for all.
×