Jump to content

David Heffernan

Members
  • Content Count

    3586
  • Joined

  • Last visited

  • Days Won

    176

Everything posted by David Heffernan

  1. A complete repro is probably necessary here. A timer seems needless. Just keep track of the time when you last flushed and do it again once a second has elapsed.
  2. You reap what you sow. Don't create multiple variables with the same name.
  3. David Heffernan

    Setting Environment Variables

    Don't think that's true. That's the point of the broadcast message. The shell updates its environment and uses that when creating new processes.
  4. David Heffernan

    Setting Environment Variables

    Did you do any debugging? Did you check that the registry was modified as intended? Reference back to https://docs.microsoft.com/en-gb/windows/win32/procthread/environment-variables
  5. David Heffernan

    Setting Environment Variables

    You code runs the risk of hanging when it broadcasts. But the basic concept is correct albeit poorly implemented. Have you done any debugging?
  6. David Heffernan

    Application blocking (suspended)

    The answer in that link appears factually misleading at best, probably downright incorrect.
  7. David Heffernan

    Which rise no problems ?

    Provide a minimal complete reproduction.
  8. David Heffernan

    Rules for changing cursor to HourGlass and back

    This approach is what you take when you hate your users. They can't tell whether or not your program is stuck in a non terminating loop, and the OS asks if you want to terminate the program. So only do this if you want to make your users suffer.
  9. David Heffernan

    Which rise no problems ?

    Don't change libraries and hope. The library you use is known to work well. There's a defect in your code. Work out what it is. Trial and error never works out. Provide a minimal yet complete program ideally a console app. Then you can hope for some help.
  10. David Heffernan

    Rules for changing cursor to HourGlass and back

    Why would that be odd? That's pretty much a canonical use of try finally.
  11. David Heffernan

    Delphi-neon, any thought?

    Jokes aside, any user that feels that the testing could be broadened can write some tests and submit a PR.
  12. David Heffernan

    Delphi-neon, any thought?

    Tested 42 and Lorem ipsum, that seems pretty complete to me. 😉
  13. David Heffernan

    Delete a Registry Key...

    No. It's in HKCU.
  14. David Heffernan

    Delete a Registry Key...

    OK, just looked tlat the documentation and it explains it all. You have to delete the sub keys. And you won't get an error in your code because the function returns a boolean indicating success or failure. You didn't check this. Let me gently suggest that rather than tearing hair out, the documentation may help!
  15. David Heffernan

    Delete a Registry Key...

    Don't you need to empty the key before you delete it?
  16. David Heffernan

    Delete a Registry Key...

    Is the key empty?
  17. David Heffernan

    Beginner - How is Delphi for mobile development?

    Delphi is no easier than Java to learn. Delphi on mobile hasn't had the greatest track record. For instance at the moment there is no 64 bit Android compiler, thus locking delphi out of the app store. Yes there are temporary workarounds but it is not a great situation. Embarcadero are struggling to keep pace with developments on the platforms that they attempt to support. Quality has historically been a huge problem for Delphi. Both in their various compilers and related tooling, and their library code. They have a track record of releasing products and libraries that are full of bugs, and then spending many releases trying to fix them. The VCL remains a brilliant piece of work and for native Windows UI development it still excels. If I were you I'd widen the search. You say that you don't have time to learn a more difficult language. And that you want to start a business on the side. To be honest, those two statements don't sound very compatible. Making a business work takes a huge investment of time. Being a successful programmer demands mastery of tools and language. And that takes time. There are no shortcuts.
  18. David Heffernan

    With's the deal with "With"?

    Dude, before my time. Also, how we miss Rob Kennedy from the Delphi world.
  19. David Heffernan

    Good practices with nested methods

    But they have a much wider scope. Not a problem if your units have only one class. But with many classes it can be an issue.
  20. David Heffernan

    Good practices with nested methods

    Nested methods are one of the biggest things stopping me porting my code to C++.
  21. David Heffernan

    Calculating the average angle

    No, it's using arctan2 rather than arctan. Just read every single other implementation on that page. As far as both sumsin and sumcos being very close to 0, I would still advise not using a tolerance. All you can achieve by that is giving a less inaccurate answer than is possible to reach. If you want to do better, use one of the algorithms used for dealing with roundoff when calculating sums, for instance Kahan summation.
  22. David Heffernan

    Calculating the average angle

    Actually the comparison against eps is wrong and should be removed. Call arctan2 unconditionally. Also the divide by cnt is utterly wasteful. Bogus comparisons against small numbers drive me mad.
  23. David Heffernan

    IComparer Interface not being released

    The const param reference counting bug that keeps on giving. https://stackoverflow.com/a/31028671/505088 https://stackoverflow.com/a/7640979/505088 https://stackoverflow.com/q/4509015/505088 QC report 90482 and presumably many others. Of course, Emba killed QC. Thanks so much for that. Can I be arsed to re-enter all the unsolved reports that were killed when QC was killed? No I cannot.
  24. Not so much humour as a comment about the arrogance of imagining that the big company can just decide to buy the small company. Perhaps the small company is happy to be independent.
  25. Perhaps they could buy Greenland as well
×