-
Content Count
3701 -
Joined
-
Last visited
-
Days Won
185
Everything posted by David Heffernan
-
git and Delphi tooling?
David Heffernan replied to Lars Fosdal's topic in Project Planning and -Management
Fork is highly regarded. I know that @Stefan Glienke has moved to using Fork having previously used SourceTree. -
Why is an enumerated type requiring the type name before the constants?
David Heffernan replied to PiedSoftware's topic in Delphi IDE and APIs
These doc links explain it Simple Types (Delphi) - RAD Studio (embarcadero.com) Scoped Enums (Delphi) - RAD Studio (embarcadero.com) -
https://stackoverflow.com/questions/65186802/countdown-timer-in-delphi Please don't cross post, or if you do, refer to the preferred version.
-
Prefix unit local variable names
David Heffernan replied to Mike Torrettinni's topic in General Help
Except the reality is that you do take care over the latter case that you use, even though the compiler ignores it. It's somewhat ironic that PascalCase is a thing if letter case doesn't matter in Pascal. When you choose names, you take care over the letter case that you use, and then you try to stick to that letter case when you use that name. Which to me is the clincher in why languages should be sensitive to letter case. -
ways to organize related code in a form?
David Heffernan replied to David Schwartz's topic in General Help
I'm sure @David Schwartz knows what rubber ducking is. If he didn't he'd just have typed it in to a search engine to find out. So I guess he didn't understand how rubber ducking applied here. -
Running complicated python code from existing TThread hangs
David Heffernan replied to DaveLaneCA's topic in Python4Delphi
Doesn't matter how many threads you use. It's an issue with the Python GIL that requires special treatment with threads. -
Running complicated python code from existing TThread hangs
David Heffernan replied to DaveLaneCA's topic in Python4Delphi
thread safe? · Issue #47 · pyscripter/python4delphi · GitHub -
Do you need multiple modules? You talked about multiple modules to hold different data. But why does the data have to live in a module?
-
I quoted it in my previous comment. You might want to read it for yourself.
-
How to calculate class size using TMemoryStream.size?
David Heffernan replied to Jenifer's topic in Algorithms, Data Structures and Class Design
You don't need to know the size of anything to persist properties. The way to do that is to use the streaming framework. There are many example codes on the web. You are probably making a mistake in believing that you need to copy a block of memory. That's not how to do persistence of complex structures. -
How to calculate class size using TMemoryStream.size?
David Heffernan replied to Jenifer's topic in Algorithms, Data Structures and Class Design
This is very complex. The answer you link to is the size when serialized. But that bears no real relation to the memory used by the class at runtime. Also there are the system resources that are used. The real question though is what you are planning to use this value for. Knowing that would allow us to understand better how you might solve this. -
This is what was stated, @FPiette. What makes you think that there is a large amount of existing Delphi code.
-
That is beside the point of this topic. Remember what the OP has actually asked.
-
What the OP is asking for doesn't seem to have any requirement for server side code. Remember that we aren't talking about your requirements, we're talking about those of the OP.
-
And you don't think that maybe, just maybe, Delphi isn't the best tool for this?
-
You don't do that with Delphi is the simple answer.
-
Prefix unit local variable names
David Heffernan replied to Mike Torrettinni's topic in General Help
a is for argument -
We still have basically no idea what you are asking.
-
Integer overflow in tStringList.SaveToFile
David Heffernan replied to Jud's topic in RTL and Delphi Object Pascal
Generally it's wise to try not to do this. -
There are countless ways in which Delphi code may be involved in web development. If you want anybody to spend their time helping you I suggest that you spend more of your time thinking about your problem, and specifying in more detail what specifically you need help with.
-
is it possible to undeclare an identifier?
David Heffernan replied to dummzeuch's topic in General Help
No -
Integer overflow in tStringList.SaveToFile
David Heffernan replied to Jud's topic in RTL and Delphi Object Pascal
This has been answered above. It's the use of an intermediate string variable that holds the entire text which is then saved. And strings have 32 bit length. I'm not sure what @emailx45 is getting at but the problem you face is not due to a shortage of memory or address space. It's just that the string length is stored in a 32 variable. And a string is used by SaveToFile to save the text. FWIW, it seems wasteful to me to make an in memory copy of GBs of text just to save it. I'd be looking for a writer based approach. Just not using the raw RTL classes because of their dire performance. -
What exactly is your rationale for wanting to use multiple engines? Why is it not possible to do this with a single engine?
-
Generic record helper for enumeration types
David Heffernan replied to chkaufmann's topic in RTL and Delphi Object Pascal
You can't have generic helpers. -
Integer overflow in tStringList.SaveToFile
David Heffernan replied to Jud's topic in RTL and Delphi Object Pascal
You don't need the if. You know that sList is not nil. Also, Free already includes a nil check. Also, there is the <> operator for not equals.