-
Content Count
3740 -
Joined
-
Last visited
-
Days Won
188
Posts posted by David Heffernan
-
-
The tooling in RAD Studio is more than a decade behind the many other IDEs around. It's feeble that we are making excuses for it not being able to do basic refactorings.
-
3
-
1
-
-
2 hours ago, corneliusdavid said:I know at least part of this was sarcastic but just in case anyone really believes that
Well, no sarcasm and this is true. Because we are a software house developing our own product.
Obviously other developers work in different settings.
-
1
-
-
53 minutes ago, Dave Novo said:So if I find a code snippet on the internet how to use the Format function to format floating point numbers and it recommends %8.2f, I should then read the source code of the format function in Delphi and make sure that I understand the entire method to ensure that the suggestion is correct.
Why read the source code. You can read the documentation. Why wouldn't you want to be confident your code worked? Fine for throw away hobbyist programs. But for professional development you couldn't survive this way. Anyone in my team that tried this would be spoken to.
-
4 hours ago, dummzeuch said:So if you get some source code to work on, you really go through it and add begin/end for every code block? I for one are definitely to lazy for that.
I don't "get some source code to work on". It's all our own code and we all follow the house style, obviously.
-
2
-
-
7 hours ago, dummzeuch said:Autoformat has one huge advantage (apart from laziness, of course): It catches wrong indentations that suggest wrong code flows:
if Condition then doX; doY; doOtherStuff;
I mean just never ever ever use single statement, always use compound and it's a non problem.
-
1
-
-
-
I was interested in the new AI chatbot that Emba are offering, which was announced in the webinar yesterday. It's at: https://www.embarcadero.com/radaicompanion
The concept is that it is an AI bot that has been tweaked to target Emba products, Delphi, C++Builder etc. Anyway, after a recent question on SO I asked:
Does the VCL have a TagObject property?The answer was a little disappointing:
Yes, the VCL does have a TagObject property. It is available in the FMX.Types.TFmxObject class, which is part of the FireMonkey (FMX) framework, not the VCL. The TagObject property allows you to store any TObject value.
I mean it gets there in the second sentence, but starting with Yes is poor. Classic AI people pleaser stuff!
I then gave it some more recent SO questions and I have to say it did a good job.
I'm quite interested in this concept though, and we've been working on something similar for our product because it's too niche for standard bots to know how to answer tricky questions.
-
2
-
-
8 minutes ago, Lars Fosdal said:Some useful stuff, but YMMV.
Yeah, some bits and pieces. But I can't see anything exciting. Just a few minor convenience improvements.
-
95% of this is them saying that they've updated their tools to the latest versions of the various libraries that they are built from, target. Which has to be done, but this is clearly just a maintenance release.
-
-
Obviously Emba have trailed the new conditional operator (wish they'd call it this and not ternary, but whatever). But we've heard nothing else. So I was interested in the what's new webinar to see what else there would be. Turns out the reason nothing else has been talked about ahead of time is that there is nothing else. I didn't have high expectations, but they've managed to fall well short of them.
Has anyone else seen anything worth talking about?
-
10 hours ago, Anders Melander said:Unless you are using it to scale graphics in real-time, or something like that, then it's a completely wasted effort. Also remember that pascal code can be inlined (avoiding the call overhead), while asm functions can't. I would replace the MulDiv with a simple expression; You likely don't need the 64-bit and overflow handling baked into MulDiv (which is a Windows API function, btw - not cheap).
There's absolutely no scenario where the performance of these scaling functions could be important. It's just blind asm for the sake of it, premature optimisation 101
-
10 hours ago, HeartWare said:Didn't know of the "ScaleValue" but it doesn't say from the description that it always scales the value as given from 96dpi to the current scale.
Yes, ScaleValue is it.
-
4 hours ago, HeartWare said:Then I just use Form1.Scale(8) to get a 96dpi 8-pixel scaled value at whatever scale factor the form (or rather, the monitor upon which the form is located) currently is at.
You definitely don't want to be doing this when the VCL provides exactly this functionality.
-
1 minute ago, PeterPanettone said:Here are the CRC-32 hashes of some words (via System.Hash.THashCRC32):
"one": 2053932785
"two": 298486374
"three": 1187371253
"four": 2428593789
"five": 1018350795These hashes are stored as keys in a TDictionary<Cardinal, TProc>, mapping each to an anonymous procedure that represents the "case" action (e.g., handling that specific string). At runtime, the input string is hashed, and the dictionary is used for quick lookup to invoke the corresponding action—mimicking a case statement efficiently. Since the hashes are collision-free for this set, no additional equality checks are needed, and the lookup is O(1).
Sure you can write a dictionary that works with just these keys. But what is the point of a dictionary that works with these specific five keys? Have you got a real world example to hand?
-
madExcept is known to have really solid stack trace capabilities so it does seem very likely that it's a mis-configuration rather than any issue with madExcept or Delphi
-
8 hours ago, dummzeuch said:The one thing that has annoyed me the most, is that you need an active subscription to even download an install bugfixes.
Given that they never fix bugs in anything other than the very latest release, it's not that big a loss!
-
You didn't account for any font scaling. So if the user has a high dpi screen and a font scaling larger than 100% the your 26 and 8 won't be right.
Then again, because you didn't provide full code and details we are all guessing a bit.
-
1
-
-
If you let your subscription lapse then they charge you full price for a new license because they are unscrupulous and hate their customers
-
2
-
2
-
-
3 hours ago, Freeeee said:code was from ? 2000,. Worked then.
There wasn't a reserved word "Result"
so you used the function name at the end of the code set equal to whatever variable
you were using to get the results.
Function doSomething: Integer;
var X : integer
begin
X := code to do something;
doSomething := X;
end.
What are you expecting anyone to do with this?
-
2
-
-
3 hours ago, Jacek Laskowski said:unfortunately the module has no documentation
This is a Python API function which is documented. And the documentation states UTF8. You won't see encodings other than UTF8 and UTF16 in the API.
-
1
-
-
On 8/7/2025 at 5:45 PM, Remy Lebeau said:No, it will not work.
Well, I would say that you can perfectly well do this with an app manifest and a private assembly.
-
Why are you expecting ANSI encodings to be of use? Why aren't you using Unicode, either UTF8 or UTF16.
I believe the function you call expects UTF8 which of course you are not passing. Then again I'm not sure why you picked on this function to make a string.
-
1
-
-
Probably the biggest problem is the inability to be precise in the statement of your issue
-
1
-
TBitmap.SaveToFile produces invalid image file
in VCL
Posted
submit a report to QP