Jump to content

David Heffernan

Members
  • Content Count

    3711
  • Joined

  • Last visited

  • Days Won

    185

Everything posted by David Heffernan

  1. David Heffernan

    How to switch condition position?

    What does the documentation say?
  2. David Heffernan

    Pitfalls of Anonymous methods and capture

    I'd still see all the replies. It's an interesting topic that you raised but it needs a clearer example to bring out the issue.
  3. David Heffernan

    appending to a dynamic array

    The subject is dynamic arrays and not open arrays.
  4. David Heffernan

    Pitfalls of Anonymous methods and capture

    Whatever. The text in the blog post didn't make the types clear. I wasn't about to download some project from a file sharing site. It's quite easy to make a complete program in a simple console app. There must be a few posts on this topic out there already.
  5. David Heffernan

    Pitfalls of Anonymous methods and capture

    If we have no knowledge of the types involved in this code then for sure we can't know what's wrong with it.
  6. David Heffernan

    Should my record be a class instead?

    Nothing in that that suggests there is a need for a global variable.
  7. David Heffernan

    Should my record be a class instead?

    You claim that these global variables "need to be global". Why is that? It would not surprise me if it turned out not to be the case.
  8. Yeah, seriously you should remove this. As far as the question, I guess you need to decide on exactly what you want to implement. Security concerns are seldom as easy as "just add a signature". You see a lot of people who want to implement security without a solid understanding and it usually ends badly.
  9. What is Acrobat doing there? Is it a certificate is the security sense, or is it just an image? Now that we have your signature in the image in this post, can't we sign things and pretend to be you? If I steal your cheque book, can't I sign them now as you?
  10. David Heffernan

    operator overloding Equal vs Multiply

    Methods aren't normal functions by that argument, so why are open array parameters fine for them? The real problem here is the decision to allow literals to have type determined by context. So [10] is either a set or an array. That is incompatible with other language features. Like method and operator overloading. There is a good reason why other languages don't attempt to infer type of literals from context.
  11. David Heffernan

    operator overloding Equal vs Multiply

    In this circumstance, for testing equality, why do you believe that a function is better than an operator?
  12. David Heffernan

    operator overloding Equal vs Multiply

    It feels wrong isn't much of an argument. If open array arguments are fine for functions why not for operators, which are just functions with syntactic sugar. Can you explain your objection with reason, rather than relying on what it feels like. And surely you understand why operators are often preferred to functions.
  13. David Heffernan

    operator overloding Equal vs Multiply

    Operators are functions. There are certainly times when it might be useful to use arrays as operator arguments. I regret that the language designers have allowed literals to have meaning determined by context in various places. When there is insufficient context, as is inevitably the case on occasion, these kind of problems arise.
  14. The design error is converting left button up into click. That's what Sertac said. Read his comment carefully. A click is button down, capture, button up.
  15. This was already covered on SO https://stackoverflow.com/questions/54401270/when-i-perform-the-ondblclick-event-form1-to-open-form2-it-fires-the-oncellcl If you are going to cross post, please note the other places that you posted so that people don't duplicate work.
  16. David Heffernan

    Is it really good practice to create Forms only as needed? Always?

    Doesn't sound like resource exhaustion is to blame. More likely plain defects in your code.
  17. David Heffernan

    Is it really good practice to create Forms only as needed? Always?

    You don't need to keep forms alive to preserve settings because you don't store setting in form instances. You store them elsewhere.
  18. David Heffernan

    Is it really good practice to create Forms only as needed? Always?

    It's not about the memory. It's about removing global variables that allow form instances to poke at each other's internals. It's analogous to making fields private rather than public.  Those form variables only exist because in Delphi 1 the designers were trying to ape functionality of VB.
  19. David Heffernan

    How to create common CreateForm method?

    The entire design seems wrong. Don't use a global variable for each form. Remove them. Use a local variable and destroy it when ShowModal returns.
  20. David Heffernan

    Test Bits in a Byte

    But this topic concerns the 8 bits in a byte.
  21. David Heffernan

    Measure Process Time

    Who says that the variation isn't happening in your process?
  22. David Heffernan

    Measure Process Time

    You'll see similar results as you do presently I predict.
  23. David Heffernan

    Test Bits in a Byte

    Ugh, a class allocated on dynamic memory just to do bit twiddling. What is so hard about the and operator?
  24. David Heffernan

    Measure Process Time

    Doesn't seem like a massive amount of variability. Probably depends on what your code does. You are measuring what is known as wall clock time. Total elapsed time. Why would you want to measure anything else? Wall clock time is the time as perceived by the users.
  25. David Heffernan

    pixel-perfect bitmap FMX app

    Define "pixel perfect" please
×