Jump to content

David Heffernan

Members
  • Content Count

    3513
  • Joined

  • Last visited

  • Days Won

    174

Everything posted by David Heffernan

  1. David Heffernan

    Record / Class

    The final function can't be right. It should be a static class function, but that's not enough. What would it return? A pointer to what instance? You'd need to allocate an instance somewhere. I'd use a helper record to get around the inability to forward declare value types.
  2. David Heffernan

    Survey of Delphi Versions in use??

    When polling you need a methodology. If you poll the entire population, it's easy. But if you poll just a sample, then you need to choose the sample carefully so that it is representative, and you need to follow up non respondents. There is a lot of science in polling to get meaningful data. A self selecting poll on a site like this will not tell you very much if anything about the overall population. But perhaps you just want to know what active members of this site use. And even if that's what you want, it will be hard to impossible to get accurate data
  3. David Heffernan

    How to get json array from string?

    Quite odd to copy some code from an SO question that is in the wrong language. This code is Java.
  4. David Heffernan

    Getting PID of winword.exe based on filename

    Which means the original idea was doomed.
  5. David Heffernan

    Getting PID of winword.exe based on filename

    Does Word use a separate process for each open document?
  6. David Heffernan

    Getting PID of winword.exe based on filename

    Does Word use a separate process for each open document?
  7. David Heffernan

    New bug with patch 1 for 11.1

    Did you submit a QP report yet?
  8. You could make a minimal example. The issue is surely with your program.
  9. Make that minimal reproduction already
  10. A minimal reproduction. The act of making one will likely show you what you did wrong.
  11. Show us a minimal reproduction of the issue. Then we can talk.
  12. This is known to be unreliable
  13. type TFoo<T> = class type TSetOfT = set of T; end; The compiler reports this error for me: [dcc32 Error] E2001 Ordinal type required
  14. David Heffernan

    Creating Import Library from DLL (64-Bit)

    https://stackoverflow.com/questions/9360280/how-to-make-a-lib-file-when-have-a-dll-file-and-a-header-file
  15. Of course it makes sense. Try declaring set of TObject and see how that works out. You'd need to constrain to an ordinal type with 256 or fewer elements and you can't do that with constraints. Too bad we can't have templates.
  16. Whilst you can't use constraints, you can use generics and RTTI to get some effective code reuse when working with enums and sets. Ideally this could be done truly generically but such is life with Delphi.
  17. We can't see what the class does. You've just shown the interface.
  18. David Heffernan

    is FMX supported RTL (Right to Left) languages?

    I think the answer is still no.
  19. David Heffernan

    Custom component TAction (s) - OnExecute overide

    I cannot understand what you mean by event in component or instance. In fact I can't make any sense out of this.
  20. David Heffernan

    load from file

    I can't understand the question at all
  21. If you want to fully test your own app this is the way to go, so that you get top down allocation for all the addresses in your program. You won't necessarily find all the issues if you only do the fastmm local allocator. Using OS top down has always worked well for me.
  22. Better is to use OS level top down allocation.
  23. Nothing here is "as expected". This is all undefined behaviour that is subject to change in future compiler releases. It's a mistake to read the return value before assigning to it.
  24. Delphi strings are managed types so they are never ill-defined in the way that unmanaged types can be before first assignment. Note that this assumes correct practise. So if you use GetMem rather than New to allocate memory for a managed type then the above statement is not correct, but then doing that would be incorrect practise.
  25. David Heffernan

    Range check error with TSysLogServer

    Maybe so. But my point about how to deal with getting a pointer from a string that may be zero length stands. So long as the use of the pointer respects the zero length and doesn't try to de-reference it.
×