Jump to content

Der schöne Günther

  • Content Count

  • Joined

  • Last visited

  • Days Won


Der schöne Günther last won the day on March 14

Der schöne Günther had the most liked content!

Community Reputation

306 Excellent


Technical Information

  • Delphi-Version
    Delphi 11 Alexandria

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Der schöne Günther

    Delphi - Direct2D - Paintbox drawing is flickering

    I am not familiar with Direct2D, but confused nonetheless - Wouldn't you need a HWND to paint into? And a TPaintBox is not a window control, it's a simple TGraphicControl descendant - Meaning you may probably paint onto your form or into that very panel, but I fail to see how a Paintbox is even remotely helpful. Thanks for updating the code snippet. Didn't know you can also create a TDirect2DCanvas pointing to a Canvas, instead of a HWND.
  2. Der schöne Günther

    State of an uninitialised variables..

    Yes, but we're just mere humans, and we don't even have a compiler that will help us by generating a warning. Even the gods from Embarcaddero occasionally trip over this, here is an example straight from the RTL itself: https://quality.embarcadero.com/browse/RSP-18300
  3. Der schöne Günther

    State of an uninitialised variables..

    I wouldn't really call those features - Rather oddities, quirks or flat-out defects 😬 You can hardly blame yourself for not expecting something like that.
  4. Der schöne Günther

    Real time desktop colors change like filters

    This surely isn't trivial. I once was about to make small tool for inverting the colors of windows that did not support a "dark theme" but I never really got started with it. It seems that you can use the (now deprecated) Magnification API to (selectively) transform colors or run filters on the whole screen (or just selected parts of it like rectangle areas or selected HWNDs): Magnification API overview (Applying Color Effects)| Microsoft Learn There is also its successor, the Desktop Duplication API - Win32 apps | Microsoft Learn which I had only used for grabbing screen data, not manipulating it. So I cannot say if it's a feasible solution for manipulating the colors.
  5. Der schöne Günther

    State of an uninitialised variables..

    Although he explicitly said local variable, it could probably have been something like this: program Project1; function getText(const txt: String): String; begin // Incorrectly assumes "Result" got // initialized to an empty string Result := Result + txt; end; begin var text: String; text := getText('This should not be visible'); text := getText('Hello'); // Outputs "This should not be visibleHello" WriteLn(text); end.
  6. Der schöne Günther

    Delphi 12.1 is available

    But what's new? And why is the .iso just 730 Megabytes? 🤔
  7. Der schöne Günther

    DelphiLint v1.0.0 released!

    I have a stupid question about Does that mean it runs entirely self-dependent, and I do not need a license for SonarQube?
  8. Der schöne Günther


    My point is that it was not necessary to add this in the first place. Without knowing better, they got talked into changing a working part of the RTL, adding new bugs and breaking existing code.
  9. Der schöne Günther


    Stuff like that makes me lose all hope. They still don't appear to have at least a minimal test coverage for the standard library. It was already reported and is allegedly fixed in "RAD Studio 12 Athens Patch 1" See: [RSP-43463] JSON serialization error with scientific double notation - Embarcadero Technologies -- Also, I have absolutely no clue why they decided to add this in the first place. The JSON specifications are crystal clear: https://ecma-international.org/publications-and-standards/standards/ecma-404/ See also: RFC 8259 - The JavaScript Object Notation (JSON) Data Interchange Format (ietf.org)
  10. Der schöne Günther

    Embed line number at design time??

    It sounds like you are trying to add an exception logging mechanism to your application. Would you like some help? All jokes aside, if that's the case, then you should really investigate proper stack tracing and exception logging mechanisms. In case (for whatever reason), you really just like to add the current line number into a string, then have a look at: https://stackoverflow.com/q/7214213
  11. Der schöne Günther

    Delphi 12: internal errors

    Well, that de-escalated quickly.
  12. Der schöne Günther

    Delphi and "Use only memory safe languages"

    For those who still can't get enough, here is a very recent article from none other than Herb Sutter, of course with emphasis on C++ C++ safety, in context – Sutter’s Mill (herbsutter.com)
  13. Der schöne Günther

    TFrame versus SubForm

    So what I gather from this thread is The IDE supports placing frames at design time. While that enables sharing or referencing components like ImageLists, it may come with additional challenges (and bugs) The VCL both supports placing and re-parenting frames and forms at runtime. There is virtually no difference between these two Correct?
  14. Der schöne Günther

    Code Review for Delphi and Pascal

    There is a Delphi plugin for SonarCube which only does very basic analysis. It could probably be extended. https://github.com/Embarcadero/SonarDelphi Apart from that, I am not aware of anything else.
  15. Der schöne Günther

    TFrame versus SubForm

    Can you shed some light on what a "SubForm" is? I am working with frames all the time. The IDE will show the wrong frames and throw error messages if you are opening project groups where the name of a frame class is not unique throughout all projects in that group. The IDE will often randomly redundantly copy parts of a frame on its container's .dfm file (even entire image lists). You will have to use your versioning system and watch carefully to commit only the parts you changed yourself, and not the random insertions by the IDE.