-
Content Count
3527 -
Joined
-
Last visited
-
Days Won
175
Everything posted by David Heffernan
-
Do you think Embarcadero would let me switch my license from Delphi to C++ builder?
David Heffernan replied to Al T's topic in General Help
Why would you need a single library? -
The Windows API functions have the same name no matter which language you call them from. This just hunts out a window by name and class, finds its first child window, and makes this window be its child. However, your real problem is that, with probability > 0.99, cross-process parenting isn't a viable solution for any problem. You say that your knowledge of winapi is not good. Well, it's going to be impossible to write this program without good knowledge of winapi. If at any point in time, you find yourself not knowing something, you must study until you acquire that knowledge. Or hire somebody that already has the knowledge.
-
Do you think Embarcadero would let me switch my license from Delphi to C++ builder?
David Heffernan replied to Al T's topic in General Help
Thus is exactly what I do and it's really not difficult. The only challenge is header file translation. Having said that, this is true for libraries with a C style interface. If it's C++ classes then you need to wrap them which is more laborious. -
This blows my mind. The try/finally is to protect the resource. So you must enter the try immediately after the resource has been acquired. I suggest that you read Dalija's book on memory management.
-
And then you need to call a few more methods and then you risk with hell. Or you need to pass the form reference to another method and you don't have it any more. So you change back to local variable pattern. Now have you multiple different patterns for the same task. Which is fine if the different patterns bring significant benefit. But they don't. So use a single unified pattern.
-
If using a local variable with the basic try finally, Create, ShowModal, Free pattern is complicated and requires simplification, then I think you may have deeper problems.
-
Very hard to understand why you'd want to give away all the knowledge of your domain that is in your delphi code and be determined to work on the xml for this. But if you want to validate the xml because your mind is made up, then crack on.
- 12 replies
-
Copying character to string problem
David Heffernan replied to Lainkes's topic in Algorithms, Data Structures and Class Design
You can understand what I wrote that way if you want. But as I explained I never intended the meaning to be that a string is the same as the Delphi type array of Char. As I explained I intended to use the word array in its general sense. For instance an array in C# is not assignment compatible with a Delphi array. Does that make a C# array not an array? -
Copying character to string problem
David Heffernan replied to Lainkes's topic in Algorithms, Data Structures and Class Design
I didn't say they were interchangeable. A Delphi string is an array of elements of type Char. The documentation says: "A string represents a sequence of characters." Wikipedia defines an array here: https://en.m.wikipedia.org/wiki/Array_(data_structure) So I guess perhaps what may be confusing here is maybe you think I am saying that a Delphi string is a Delphi dynamic array, TArray<Char>. I'm not saying that. I'm using the general computing usage of the word array. -
Copying character to string problem
David Heffernan replied to Lainkes's topic in Algorithms, Data Structures and Class Design
No, viewing a string as an array of char is pretty reasonable. I mean your argument could also be used to say that TArray<Integer> is not an array of integer because of the meta data. And when you do PChar(someString) to pass a null-terminated array of char to some external library, the compiler just passes the address of the first element. (Yes, I know about the empty string special case) -
Copying character to string problem
David Heffernan replied to Lainkes's topic in Algorithms, Data Structures and Class Design
In Delphi a string is essentially a 1 based array of char -
Imagine a world where Embarcadero weren't the only supplier of dev tools
-
Weird code in THttpConnection.ProcessWellKnownDir
David Heffernan replied to Kyle_Katarn31's topic in ICS - Internet Component Suite
The old code won't stop working. It's unrealistic to expect developers to expend extra time supporting legacy compilers and systems. It's no fun doing that. -
Why are you asking the same question in multiple topics.
-
Apache POI seems to be the go to library.
-
Then toss a coin. Expecting people to give you insights about your program's performance is a coin toss. May as weel save time and do it yourself.
-
Depends on what your program does. Try timing it.
-
I think Stefan suggests posting on Stack Overflow suitably tagged
-
Exception in TCustomSmtpClient.Destroy;
David Heffernan replied to Kyle_Katarn31's topic in ICS - Internet Component Suite
No they are not -
Weird code in THttpConnection.ProcessWellKnownDir
David Heffernan replied to Kyle_Katarn31's topic in ICS - Internet Component Suite
MaxInt -
Exception in TCustomSmtpClient.Destroy;
David Heffernan replied to Kyle_Katarn31's topic in ICS - Internet Component Suite
Nobody is going to be able to tell you what's wrong. You'll need to do some debugging. Does the issue occur when not using ReactOS? -
They can only choose from these 14 items? Why do you need any conversion? Isn't it just (EndIndex - StartIndex) / 2?
-
The problem is that your code is based on an assumption that the end time is after the start time, but 00:00 is the beginning of the day and so can never be used as an end time. Hard to advise you what to do because we don't know your goals, where your data is coming from, how you want to handle day boundaries etc.
-
Exception in TCustomSmtpClient.Destroy;
David Heffernan replied to Kyle_Katarn31's topic in ICS - Internet Component Suite
The error could be in code outside the destructor. So look in that code. We cannot see it. -
Weird code in THttpConnection.ProcessWellKnownDir
David Heffernan replied to Kyle_Katarn31's topic in ICS - Internet Component Suite
If that is the case, then MaxInt should be used for that argument