Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

12 Good

Technical Information

  • Delphi-Version
    Delphi 10.3 Rio

Recent Profile Visitors

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

  1. I would not draw directly on the canvas. Use TShapes. You may also want to have a look at this selection component that is part of FMX: TSelection
  2. You are right, Uwe. Tested it in 10.3.2 and it works as expected. Upon closer inspection it seems they fixed the Tinterlocked code which in Berlin looked like this: $ELSEIF Defined(X86ASM)} asm AND EDX,31 LOCK BTS [EAX],EDX SETNC AL end; {$ELSE} var and in Rio looks like this: {$ELSEIF Defined(X86ASM)} asm AND EDX,31 LOCK BTS [EAX],EDX SETC AL end; {$ELSE} Okay, and I thought I would be crazy or something
  3. Hi all, when running the following code program Project105; {$APPTYPE CONSOLE} {$R *.res} uses System.SysUtils, System.SyncObjs; var Sync: Integer; Test: Boolean; begin try TInterlocked.BitTestAndClear(Sync,0); Test := TInterlocked.BitTestAndSet(Sync,0); if Test then writeln('Why is Test true here ??') else writeln('Okay, That''s what I expected'); readln; except on E: Exception do Writeln(E.ClassName, ': ', E.Message); end; end. Why is it that the variable Test is set to true, when the documentation says ".... The method returns True if the bit is 1, False otherwise ". Clearly I have set the bit to 0 with TInterlocked.BitTestandClear, haven't I ? What am I missing. Tested with Delphi 10.1 Berlin.
  4. That's nifty ! I will put that one to my toolbox.
  5. M.Joos

    FMX Platform Frame design

    This is by design and not a specific problem of frames. So you cannot have platform specific design with frames. But maybe the approach suggested by Ray Konopka may work for you. He had given a session at Coderage 2018 called "Mobile View Management" in which he proposes an alternative to using frames. You can find the replay here: https://www.embarcaderoacademy.com/courses/441209/lectures/8426275 (You need to sign up for free in order to be able to watch the replay)
  6. That sounds like a feasible fix. Let's wait and see what they come up with in a hot fix.
  7. I have not installed 10.3.2 yet, so don't have the source code to look at TfieldCache. But yes it makes a lot of sense to cache the Field addresses of a class, as in a typical form loading scenario you have multiple instances of the same class, so that the expensive code to determine the Field address is not repeated over and over again. Unfortunately as Remy showed, this introduced some severe bugs, so I would expect a hot fix for 10.3.2 very soon. Hopefully they can fix TfieldCache rather than rolling back to the 10.3 approach for FieldAddress.
  8. Do you have more details about what they changed to make serialisation faster?
  9. I think your code did not work with Delphi Tokio (10.2.3) either. You should set the stored property of your child components (Panel, Rectangle, Timer) to false.
  10. M.Joos

    screen shot - reliable method

    In modern Windows (I think they started with Win7) you could use the Windows Desktop Duplication API. A delphi wrapper can be found here https://github.com/tothpaul/Delphi/tree/master/DesktopDuplicationAPI
  11. M.Joos

    Hands-On Design Patterns with Delphi

    Yes, mine arrived yesterday.
  12. No, in your example both loops will be O(INFINITE). Well, not quite. It would be O(MaxDouble / x) to be precise.
  13. In theory, yes. But which unit tests can or do test the specification in full? Well, maybe some do, but e.g. the all so often used example of a unit test for an addition fails to test the full specification.
  14. I would argue that the same is true for single threaded code as well.