Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 03/15/24 in all areas

  1. Well at least theoretically, if the heat death of the universe doesn't occur first Here is a video to get you warmed up.... I updated my sample from last year with a callback allowing you to view the digits of Pi as they are generated. All the source code is on GitHub. Happy Pi day 2024! Created a few fun wallpapers too.
  2. Remy Lebeau

    Anonymous methods as interfaces

    That is correct. Basically, an anonymous method is implemented as an interfaced object with an Invoke() method that matches the signature of the anonymous method. https://stackoverflow.com/questions/39955052/how-are-anonymous-methods-implemented-under-the-hood Not by Embarcadero, as it is an implementation detail of the compiler. But it is a well-known implementation that is documented on numerous sites/blogs.
  3. DelphiUdIT

    FloatToJSON

    But is not forbidden:
  4. dummzeuch

    Embed line number at design time??

    It does indeed. It should also be possible to write a function that reads its own return address from the stack and then returns this value as the result. This then could be passed to GetLocationInfo. I'm not sure how to implement this, but it shouldn't be rocket science. Edit: There is System.ReturnAddress, introduced with Delphi XE2, which gives you just that, so function GetCurrentLineNumber: Integer; var ModInfo: TJclLocationInfo; begin ModInfo := GetLocationInfo(ReturnAddress); Result := ModInfo.LineNumber; end; Should do the trick (untested) Edit: Just tried it. It works, at least in Delphi 10.2. Edit: JclDebug already contains such a function called LineByLevel.
  5. Der schöne Günther

    FloatToJSON

    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)
  6. Remy Lebeau

    Delphi 12 does not catch EXCEPTIONS ANYLONGER.

    You are invoking floating-point division, not integer division. All floating-point exceptions have been intentionally disabled by default in Delphi 12: http://docwiki.embarcadero.com/RADStudio/Athens/en/What's_New#Disabling_Floating-Point_Exceptions_on_All_Platforms Dividing a floating-point value by 0 used to raise an EDivByZero exception, but by default it no longer does so. This page explains how to restore the old behavior if you really need it: http://docwiki.embarcadero.com/RADStudio/Athens/en/Floating_Point_Operation_Exception_Masks#How_to_Restore_Old_Behavior
  7. Kas Ob.

    Hunting a unit reference

    Rename that unit, then build.
  8. Alexander Sviridenkov

    Hunting a unit reference

    Link to latest build: https://delphihtmlcomponents.com/graph.zip
  9. salvadordf

    My new project : WebView4Delphi

    I just published a new project in GitHub called WebView4Delphi. WebView4Delphi allows you to embed Chromium based web browsers in your Delphi or Lazarus applications using the WebView2 runtime. It uses the latest stable version of the WebView2 nuget package 1.0.1054.31. I used many of the tricks I learned creating CEF4Delphi and you will notice many similarities if you used it. I still have to write the documentation but you can build the available demos to see it working in VCL, FMX and Lazarus apps. There are a few things pending like the "windowless mode". It's being distributed with a simple MIT license so anyone can do whatever s/he wants with it. https://github.com/salvadordf/WebView4Delphi
  10. It's Sunday man. You haven't even met the hardcore yet. Be patient. Perhaps you could create a table to track how long it takes until you become angry again 😛
  11. Dave Nottage

    Delphi 12 and Android 14

    It's because you're running a 32-bit app on a 64-bit device with a newer version of Android that contains that warning message because 32-bit will eventually go away. To avoid the warning, deploy a 64-bit version of your app.
×