Jump to content

David Heffernan

Members
  • Content Count

    3701
  • Joined

  • Last visited

  • Days Won

    185

Everything posted by David Heffernan

  1. David Heffernan

    Fast Base64 encode/decode

    One thing you could easily do would be to always output the db instructions, but put the asm in comments, then it would be just as readable, but have no ifdefs
  2. David Heffernan

    set of object instances

    All these people suggesting TList (i.e. an array) are just asking for performance problems if ever the collection has a significant size.
  3. David Heffernan

    Assigning UTF-8 to a control

    The standard approach is to decide what encoding to use internally. And then convert between that encoding and any other encoding when the data initially enters your program, or at the last moment before it leaves. Given that the native encoding of the frameworks that C++ Builder supports is utf16, that is the obvious choice for the internal encoding. And then you can use TEncoding to perform all other conversions. Why are you wanting to go low level to C runtime and Win32? Why don't you use the frameworks provided.
  4. David Heffernan

    Fast Base64 encode/decode

    I think I'd extend the tool to produce cleaner output
  5. David Heffernan

    Delphi Professional Database Connectivity

    Not really relevant since making software this way would breach the license.
  6. David Heffernan

    Why Should a C-Sharper Learn Delphi?

    I don't know about FPC, but FPC is just a pascal compiler. You are asking about libraries. And I certainly don't know anything about them.
  7. David Heffernan

    Why Should a C-Sharper Learn Delphi?

    It depends what native is important. FMX doesn't use native GUI widgets and toolkits. But it's native in the sense that the compiler emits code that runs on the metal. To me it feels like the former is an important limitation and the latter is just not relevant.
  8. David Heffernan

    Why Should a C-Sharper Learn Delphi?

    Can you? You can with VCL but FMX isn't native. Is that really a significant advantage over C#?
  9. David Heffernan

    Assigning UTF-8 to a control

    If it's a char* then no. But if you held the data in a type that also had an encoding then the rtl would convert. Why not convert to utf16 as early as possible though?
  10. David Heffernan

    Assigning UTF-8 to a control

    Where is the UTF8 text coming from?
  11. David Heffernan

    set of object instances

    Yes they did
  12. David Heffernan

    set of object instances

    Doesn't handle duplicates
  13. David Heffernan

    set of object instances

    Spring has a collection that meets your needs. With pure rtl you can fake it with a geneic dictionary.
  14. David Heffernan

    Local variables broken when debugging .obj files?

    If I were you I'd compile the code into a DLL and link to that. My experience is that works more reliably. I used to do the .obj dance back in the day but moved away from it. Very happy to have done so.
  15. David Heffernan

    Local variables broken when debugging .obj files?

    I didn't even know that Delphi debugger would step into obj files. How did you compile the .obj file? Where is Delphi getting the debug info from?
  16. David Heffernan

    Can anyone spot the errors?

    I don't really understand this either. I think @PeterBelow was just stating this clearly, and did a good job of it.
  17. David Heffernan

    Sorting two lists in step?

    The most interesting thing here for me is that the question asks about sorting, but in reality what you wanted to do was efficient lookup of name/value pairs.
  18. David Heffernan

    Sorting two lists in step?

    Fairly simple to write a function to save the content of a collection to a text file.
  19. David Heffernan

    ini file not writtable

    Not with the code most recently by the asker. That singleton code is enormously complex, obfuscates, and is certainly not helpful here.
  20. David Heffernan

    ini file not writtable

    Replace thus with Settings.Free which internally performs that nil check
  21. David Heffernan

    ini file not writtable

    None of this is making much sense but whatever. More generally I strongly recommend you get out of the habit of using global variables.
  22. David Heffernan

    ini file not writtable

    Use a debugger, and look at what is in apath. Knowing how to use a debugger is a bit skill.
  23. David Heffernan

    ini file not writtable

    We don't know what Settings is. How about a minimal but complete example.
  24. David Heffernan

    security with no access to the cmd.exe

    It depends on what your external processes do. If you are trying to do something that will be locked down then I guess it will be affected. But calling CreateProcess per se doesn't requires cmd.exe. Unless that's the process that you are trying to create.
  25. David Heffernan

    Delphi 7 compatibility with Windows 11?

    Nope, still there, why would MS remove it
×