Jump to content

David Heffernan

Members
  • Content Count

    3710
  • Joined

  • Last visited

  • Days Won

    185

Everything posted by David Heffernan

  1. David Heffernan

    Boolean evaluation

    It would have been trivial to solve if only you'd used the debugger. Make it your next mission to learn how to use the debugger.
  2. David Heffernan

    Boolean evaluation

    It's simple. Why write if SomeBool = True then when you can write If SomeBool then It simply adds nothing.
  3. David Heffernan

    Boolean evaluation

    Why is it so hard to reach the conclusion that aUser.Administrator is false? Instead of being helpless here, you can get help from us by providing a minimal reproduction. Easier still would be simply to debug your program. Have you done that?
  4. David Heffernan

    Boolean evaluation

    Never compare to False or True. Instead write if someBool then Or if not someBool then That's not your problem though. Your problem is quite simple. It's the most obvious explanation. You are mistaken, in fact aUser.Administrator is false. It's that simple.
  5. David Heffernan

    Why is ShowMesssage blocking all visible forms?

    Yeah, modal dialogs and popup are deeply invasive. Find a different way to let the user know.
  6. David Heffernan

    'stdcall' for 32-bit vs. 64-bit?

    As discussed above the conditional code simply adds clutter for no benefit. The compiler has already handled the issue for you. Remove the conditional, and let the compiler ignore stdcall in x64. A second point is the use of the export directive. It is also always ignored (a hangover from 16 bit days). Again it should be removed. Therefore the best practise would be to write: procedure MyProc; stdcall; And that's it. Obviously you still need the exports list somewhere.
  7. David Heffernan

    Minimising Mainform but leaving sub forms normal

    It depends on the window ownership (aka popup parent) relationships between your forms. What is that in your case?
  8. David Heffernan

    'stdcall' for 32-bit vs. 64-bit?

    The ifdef is pointless and wasteless. On x64 stdcall is, like all calling conventions, ignored. So remove the ifdef and leave stdcall there for the platform that it has meaning.
  9. This class can't be used without the compare type being specified.
  10. This seems bogus. Define "really core" please.
  11. You are advocating defining new classes in order to set a single field in the base class. If you can't see what is wrong with that I am surprised. I already said.
  12. OMG, take a poor idea, and make it much worse
  13. That's a false goal. Remove that goal from your life. Following it will be making your code worse.
  14. It works. But better to have one constructor that accepts an argument. Think of the time you need to decide at runtime which path to take. Then your way is hopeless.
  15. David Heffernan

    How should I organize cross platform code?

    Ugh, the code you write shouldn't need those ifdefs. That the entire point of you using the libraries provided by others, like Emba. They present a common interface to you. That's the entire point of cross platform coding.
  16. David Heffernan

    language updates in 10.4?

    Spend some time looking at the development process and quality over in C# and .net land, and then see if you honestly can regard Emba's process and quality even remotely in the same ball park.
  17. David Heffernan

    Generic class

    It's not a choice between either generics, or polymorphism. You can use both.
  18. David Heffernan

    Generic class

    Because that's the only way to make this work. Your expectations seem unrealistic. As I see it you face two choices: 1. Code it the way I said, and thus have your code work the way you want. 2. Code it your way, and have your code not work the way you want. I don't understand why you want to take option 2.
  19. David Heffernan

    Generic class

    constructor constraint isn't going to be much use here, you can get rid of it. What you need is a virtual constructor on the base class, and virtual methods. And then obviously to override those methods on subclasses.
  20. David Heffernan

    What is the best way LoadFromFile & Thread? (FMX)

    We don't really know what your main goal is. Hard to give useful advice.
  21. David Heffernan

    What is the best way LoadFromFile & Thread? (FMX)

    Define "best" please. Also, the try/finally seems a little pointless.
  22. David Heffernan

    language updates in 10.4?

    The eternal optimist
  23. David Heffernan

    Generics and Classes on Windows 2000 = OOM

    Strange suggestions given that all symptoms point to memory leak in your code.
×