Jump to content

David Heffernan

Members
  • Content Count

    3710
  • Joined

  • Last visited

  • Days Won

    185

Everything posted by David Heffernan

  1. David Heffernan

    What it's like to be a Delphi Developer

    I love the parts where he says RAD Studio is awesome and Visual Studio is terrible.
  2. David Heffernan

    10.4.1+ Custom Managed Records usable?

    Correct. But there are many possible ternary operators. It's the conditional operator, which is an example of a ternary operator.
  3. David Heffernan

    10.4.1+ Custom Managed Records usable?

    We should stop referring to the conditional operator as "the" ternary operator. A ternary operator is one with three operands. Just as a binary operator is one with two operands.
  4. David Heffernan

    Prevent OnClick to be handled twice

    Oh, I am confused. You said you don't want it to run twice.
  5. David Heffernan

    Handlin the message and returning value to the caller

    The sender of the message will receive the return value that you set. Perhaps a bigger problem is that vcl window recreation means that your form's window handle is liable to change during its lifetime. For ipc using windows messages you need to use stable window handles.
  6. David Heffernan

    Prevent OnClick to be handled twice

    Set OnClick to nil in the event handler and leave it as nil until the program terminates. Then the event handler can never run again. I presume that you want the event to run no more than once during the life of the process. Or is that assumption incorrect.
  7. Correct. And as a developer that does a lot of parsing of scientific / engineering data, I just don't recognise the issue of dealing with thousand seperators. In the data that I process, they just don't appear. You don't bother trying to strip them, you just require the data not to have them. Exactly. It's a mugs game trying to handle data whose formatting is ambiguous, so don't do it.
  8. Seriously veering off topic here. Date strings don't go through StrToFloat.
  9. David Heffernan

    Apply the settings to the App without having to close it

    Write the code to apply the changes when they are made, and not just at load time.
  10. David Heffernan

    No StringHelper for saving to file?

    The question was which framework has methods on a basic string type for loading and saving to file. A collection of strings is not a basic string type.
  11. David Heffernan

    No StringHelper for saving to file?

    No, TStringList is not a basic string type.
  12. David Heffernan

    10.4.1+ Custom Managed Records usable?

    OK, I see where you are coming from. I just assumed that implicit in the Q was that any migration was done for the right reasons, rather than for its own sake.
  13. David Heffernan

    10.4.1+ Custom Managed Records usable?

    Nobody is suggesting that. The question is for people that are wanting to use the new feature to take advantage of its benefits.
  14. David Heffernan

    10.4.1+ Custom Managed Records usable?

    You'd use this functionality to be able to write more concise and cleaner code, in situations where it provided benefit. So the answer to "why should I?" is when there are good reasons to.
  15. David Heffernan

    What is this syntax?

    You tell me. What is the use here? You have not explained the intention.
  16. David Heffernan

    upcoming language enhancements?

    If they released when it was ready, and spent time fixing the broken windows immediately, then they would be able to develop more efficiently. By letting the defects endure, they just store up problems for the future. Technical debt. I don't find a comparison of modern vs historical delphi very instructive. Should be modern delphi vs its peers.
  17. David Heffernan

    What is this syntax?

    This is interop.
  18. David Heffernan

    What is this syntax?

    Explicit ordinal values tends to be used for interop with external libs. It's rarely useful for pure delphi code.
  19. Well, not really. Certainly in my experience when dealing with floating point data, you can just mandate that it doesn't have thousand separators. Perhaps if you are dealing with currency then you'd need to handle thousand separators but for other data it's not necessary.
  20. Try passing such a string to StrToFloat and see how it works out for you.
  21. So far as I am aware, routines for conversion from string to float do not accept strings with thousand seps so this is just not an issue.
  22. David Heffernan

    memory usage of TJPGImage

    Memory footprint. InstanceSize is just the instance and not the dynamically allocated data it owns.
  23. David Heffernan

    memory usage of TJPGImage

    If you are going to cache them, cache the jpeg stream rather than the decoded image. Then decode the image on demand with LoadFromStream.
  24. David Heffernan

    Google GMB via Delphi?

    Isn't it just a REST API? Like so many others? I don't understand why there would need to be anything delphi specific.
  25. That's probably not true. I think I dtoa accepts both, or if not then I modified it. Since I'm in control of the conversion code thats the right way.
×