-
Content Count
2771 -
Joined
-
Last visited
-
Days Won
147
Everything posted by Anders Melander
-
ANN: Better Translation Manager released
Anders Melander replied to Anders Melander's topic in Delphi Third-Party
I'm not sure what you're asking. Do you mean like this: -
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.
-
ANN: Better Translation Manager released
Anders Melander replied to Anders Melander's topic in Delphi Third-Party
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. -
ANN: Better Translation Manager released
Anders Melander replied to Anders Melander's topic in Delphi Third-Party
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. -
Is a "bare-minimum" EurekaLog possible?
Anders Melander replied to aehimself's topic in Delphi Third-Party
Ah, yes; That's madExcept messing things up for everybody else. I thought you meant that madExcept didn't handle nested exceptions. -
Is a "bare-minimum" EurekaLog possible?
Anders Melander replied to aehimself's topic in Delphi Third-Party
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; -
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.
-
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.
-
I'll be happy to sell you a copy.
-
TFDTable should be able to do all this on its own. You don't need a separate memory dataset. See TFDDataSet.Offline
-
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.
-
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.
-
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.
-
I knew it! https://www.imdb.com/video/vi2049426201
-
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.
-
DPI Awareness, tForm.CurrentPPI and PixelsPerInch not always identical !!???
Anders Melander replied to A.M. Hoornweg's topic in VCL
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?... 🤔 -
What? No comment on the pointless use of FreeAndNil? Ah. There it was 🙂 which ironically is preceded by this statement: Color me insecure then.
-
DPI Awareness, tForm.CurrentPPI and PixelsPerInch not always identical !!???
Anders Melander replied to A.M. Hoornweg's topic in VCL
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. -
Debugging Issues in D11 64Bit with Packages
Anders Melander replied to MathewV's topic in Delphi IDE and APIs
This applies even to 32-bit DLLs/packages in my experience. -
More efficient string handling
Anders Melander replied to parallax's topic in Algorithms, Data Structures and Class Design
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. -
More efficient string handling
Anders Melander replied to parallax's topic in Algorithms, Data Structures and Class Design
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. -
More efficient string handling
Anders Melander replied to parallax's topic in Algorithms, Data Structures and Class Design
What? There's a manual? 😉 -
DPI Awareness, tForm.CurrentPPI and PixelsPerInch not always identical !!???
Anders Melander replied to A.M. Hoornweg's topic in VCL
Nice catch! 👌 -
More efficient string handling
Anders Melander replied to parallax's topic in Algorithms, Data Structures and Class Design
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. -
More efficient string handling
Anders Melander replied to parallax's topic in Algorithms, Data Structures and Class Design
No need for that. Just run it in a profiler and you will know exactly which statements you should concentrate your efforts on.