Jump to content

David Heffernan

Members
  • Content Count

    3527
  • Joined

  • Last visited

  • Days Won

    175

Everything posted by David Heffernan

  1. David Heffernan

    PowerBuilder Code Covert to Delphi

    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.
  2. 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.
  3. David Heffernan

    Change of coding style/structure..

    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.
  4. David Heffernan

    Change of coding style/structure..

    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.
  5. David Heffernan

    Change of coding style/structure..

    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.
  6. David Heffernan

    XML validation

    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.
  7. 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?
  8. 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.
  9. 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)
  10. In Delphi a string is essentially a 1 based array of char
  11. David Heffernan

    Cpp2 - Herb Sutter

    Imagine a world where Embarcadero weren't the only supplier of dev tools
  12. David Heffernan

    Weird code in THttpConnection.ProcessWellKnownDir

    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.
  13. David Heffernan

    Which registry to edit

    Why are you asking the same question in multiple topics.
  14. David Heffernan

    FMX and Excel application

    Apache POI seems to be the go to library.
  15. David Heffernan

    Any advantage to using FastMM5??

    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.
  16. David Heffernan

    Any advantage to using FastMM5??

    Depends on what your program does. Try timing it.
  17. David Heffernan

    Best place for Spring4D questions

    I think Stefan suggests posting on Stack Overflow suitably tagged
  18. David Heffernan

    Exception in TCustomSmtpClient.Destroy;

    No they are not
  19. David Heffernan

    Exception in TCustomSmtpClient.Destroy;

    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?
  20. David Heffernan

    HoursBetween

    They can only choose from these 14 items? Why do you need any conversion? Isn't it just (EndIndex - StartIndex) / 2?
  21. David Heffernan

    HoursBetween

    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.
  22. David Heffernan

    Exception in TCustomSmtpClient.Destroy;

    The error could be in code outside the destructor. So look in that code. We cannot see it.
  23. David Heffernan

    Weird code in THttpConnection.ProcessWellKnownDir

    If that is the case, then MaxInt should be used for that argument
×