Jump to content

Anders Melander

Members
  • Content Count

    2771
  • Joined

  • Last visited

  • Days Won

    147

Everything posted by Anders Melander

  1. Anders Melander

    ANN: Better Translation Manager released

    I'm not sure what you're asking. Do you mean like this:
  2. Anders Melander

    docwiki.embarcadero.com is not working

    It's also the perfect place to get a noncommittal answer. I'll give you the answer right now so you don't have to wait: Okay, maybe not that last part but that would at least have meaning.
  3. Anders Melander

    ANN: Better Translation Manager released

    No such luck. I've reproduced the problem but it seems to be caused by a bug in DevExpress. I'll have a closer look at it tonight.
  4. Anders Melander

    ANN: Better Translation Manager released

    Thanks for the feedback. Keep it coming! I have not done any high DPI testing whatsoever but I'll see if I can squeeze that in today. Since I'm using DevExpress control it should mainly be a case of providing the correct manifest settings. - I hope 🙂 The long string problem has already been fixed in commit 6d52cf4438139b3c79c4776d444d85610782a5fc (26 jan 2022) but I haven't uploaded a build of that version.
  5. Anders Melander

    Is a "bare-minimum" EurekaLog possible?

    Ah, yes; That's madExcept messing things up for everybody else. I thought you meant that madExcept didn't handle nested exceptions.
  6. Anders Melander

    Is a "bare-minimum" EurekaLog possible?

    Works for me. What's your problem? type EInner = class(Exception); EOuter = class(Exception); ... begin try raise EInner.Create('Inner'); except Exception.RaiseOuterException(EOuter.Create('Outer')); end; end;
  7. Anders Melander

    A book about Object Pascal Style Guide

    What property? 🙂 Sure but isn't that topic stone dead by now? The OP has taken his ball and gone home and that's the end of that.
  8. Anders Melander

    A book about Object Pascal Style Guide

    I'm sure you understand why. procedure TFooBar.SetValue(const AValue: TFooFoo); begin var Value := AValue.Transform; FValue := Value; end; Did you mean that there are better solutions? Sure there is but I think this is a case of preferring good enough over perfect.
  9. Anders Melander

    A book about Object Pascal Style Guide

    I'll be happy to sell you a copy.
  10. Anders Melander

    Using memory table or else

    TFDTable should be able to do all this on its own. You don't need a separate memory dataset. See TFDDataSet.Offline
  11. Anders Melander

    Window message sent to a component

    If you're using ProcessWindowMessage as the WndProc you declared with AllocateHwnd then it's no surprise that ProcessWindowMessage are seeing all messages. The message directive is used to build a message dispatch table but that table is only used if the messages are process via the Dispatch method. You could call Dispatch within your WndProc and have the message routed via the dispatch table (to another method) but there's really no reason for that extra indirection in this case. Just filter directly within ProcessWindowMessage.
  12. Anders Melander

    A book about Object Pascal Style Guide

    A wiki wouldn't require a coordinator once it's set up but it would still need somebody to rule in case of conflicts and since people doesn't agree on style (which is why a style guide is needed in the first place) I don't see a happy outcome of that.
  13. Anders Melander

    A book about Object Pascal Style Guide

    Why put a CC BY-SA license on it then? I don't care either way but as far as I can see that troll is out of the box.
  14. Anders Melander

    A book about Object Pascal Style Guide

    I knew it! https://www.imdb.com/video/vi2049426201
  15. Anders Melander

    A book about Object Pascal Style Guide

    That would be a pity. I found it well written with excellent and relevant content. Unfortunately my own experience is that those that need a style guide the most are also those that are the least likely to read something like it. In my current position one of my responsibilities is to be the source code gatekeeper; I review each and every check-in for code style, bad patterns and obvious weaknesses. We need this because many of our developers are fresh out of school and inexperienced or mainly has C# experience. On top of that much of our code were written by amateurs loooong time ago and is simply horrible. On our required reading list is a very thorough style guide which I repeatedly have to refer to when people, including our lead developer, produce code that plainly demonstrates that they haven't read it. Apparently they simply haven't understood the benefits of adherence to a common code style in a large code base.
  16. Anders Melander

    DPI Awareness, tForm.CurrentPPI and PixelsPerInch not always identical !!???

    I only started getting CAPTCHAs last month. Before that nothing. Maybe they only have a limited number of them so there's not enough for everyone to get them?... 🤔
  17. Anders Melander

    A book about Object Pascal Style Guide

    What? No comment on the pointless use of FreeAndNil? Ah. There it was 🙂 which ironically is preceded by this statement: Color me insecure then.
  18. Anders Melander

    DPI Awareness, tForm.CurrentPPI and PixelsPerInch not always identical !!???

    And there's even an easy fix. By the way, am I the only one that has problems with the CAPTCHA at quality.embarcadero.com ? I always have to answer the challenge 3 times before it accepts my answer.
  19. Anders Melander

    Debugging Issues in D11 64Bit with Packages

    This applies even to 32-bit DLLs/packages in my experience.
  20. You could do that but then you would have to use a ring buffer or something like it. It's much easier if you: Producer (probably main thread): Allocate a buffer and place it in a pool (just a list of buffers). Grab a buffer from the pool. Goto 1 if the pool is empty. Read data, process it and write to the buffer. Place the buffer into a FIFO queue. Goto 2. Consumer (a dedicated thread): Fetch a buffer from the FIFO queue. Write buffer to disk. Place buffer in buffer pool. Goto 1 You will need some synchronization primitives to control access to the FIFO queue and to signal the writer thread when there's data in the queue. It's common to use a semaphore for this. We can't make the disk faster but we can do something useful while we're waiting for the disk.
  21. Yes, I know 🙂 Looking at your numbers, since WriteFile dwarfs all the string related operations, it seems that you might be able to eliminate the need to optimize the string handling just by moving your file write operations to a background thread. For example with overlapped I/O.
  22. What? There's a manual? 😉
  23. Anders Melander

    DPI Awareness, tForm.CurrentPPI and PixelsPerInch not always identical !!???

    Nice catch! 👌
  24. It's a tool you should have in your tool chest so consider it an investment. A profiler is the only way to make sure you aren't doing premature optimization. The VTune profiler is free and with map2pdb you can use it with Delphi.
  25. No need for that. Just run it in a profiler and you will know exactly which statements you should concentrate your efforts on.
×