Jump to content

David Heffernan

Members
  • Content Count

    3710
  • Joined

  • Last visited

  • Days Won

    185

Everything posted by David Heffernan

  1. David Heffernan

    Overrided TForm.DestroyWnd is not executed

    Indeed. So one wonders why.
  2. David Heffernan

    Overrided TForm.DestroyWnd is not executed

    You can presumably remove the drop target code and just create and free a TObject instead to show that the issue is not in the drop target code. Making a minimal example is really useful.
  3. David Heffernan

    Overrided TForm.DestroyWnd is not executed

    The code in the linked SO answer doesn't leak. Update: Er, it does leak. I updated it to override CreateWindowHandle and DestroyWindowHandle, as per discussion below. Sorry!!
  4. David Heffernan

    Any Known GDI Lockup Issues with Delphi 10.3.2?

    Usually that's wishful thinking. What happens next in this thread is that people spend many days suggesting all sorts of things that could be. That doesn't tend to be very productive. Guesswork seldom proves effective. We all know this to be true, and still we do it. Getting a stack trace from all threads in your process, during a lock up would help. Again, madExcept would give you that with madTraceProcess.
  5. David Heffernan

    Any Known GDI Lockup Issues with Delphi 10.3.2?

    Use process explorer or process hacker to see if you are leaking gdi objects. Use madExcept leak detection tool which detects all sorts of leaks. You need to try to narrow things down.
  6. David Heffernan

    WinRT API Resources

    No reason to suspect that COM+ is the problem. Surely its just a defect in your code. Hard to imagine introducing another framework is the easiest solution. In any case I think it sounds like step 1 is to identify the problem precisely.
  7. David Heffernan

    WinRT API Resources

    What are you trying to achieve? What can't you achieve without using UWP?
  8. David Heffernan

    Main Form jumping into view..

    With these issues you need to understand the hierarchy of your windows' owner relationships. The term owner is the winapi term. In VCL terms it is popup parent, not to be confused with VCL owner. Start by making a minimal reproduction and try to understand that window owner hierarchy. Read the MSDN docs on window features to understand the impact of window owner.
  9. David Heffernan

    Creating an array of controls in Delphi

    What's wrong with just adding the controls to a collection? Controls.Add(control1); Controls.Add(control2); Etc.
  10. David Heffernan

    Cross-platform solution to forcefully end a thread

    Maybe you are right. Maybe my multithreaded program doesn't work.
  11. David Heffernan

    Cross-platform solution to forcefully end a thread

    What are you on about. It is perfectly possible to write code that is correct, and behaves in a deterministic fashion with threads. For sure the order of scheduling and execution is not deterministic, but that doesn't mean that you can't write programs whose behaviour is deterministic. I for one make a living doing just that.
  12. David Heffernan

    Cross-platform solution to forcefully end a thread

    pthread_kill But don't do it. It's surely not the solution to your problem.
  13. David Heffernan

    Extend Delphi 10.3 Code Editor

    FYI, cross posted here: https://stackoverflow.com/questions/58858474/how-do-i-extend-the-delphi-10-3-code-editor
  14. David Heffernan

    How to manage defined list values

    [Names('foo', 'bar')] TMyEnum = (foo, bar); It's kinda flaky of course because of the limitations on attribute constructor arguments being true constants. Later on I can write Enum.Name(someEnum)
  15. David Heffernan

    How to manage defined list values

    I use a cache, a dictionary keyed on the type info pointer, iirc
  16. David Heffernan

    How to manage defined list values

    Yes http://docwiki.embarcadero.com/RADStudio/en/Attributes_(RTTI)
  17. David Heffernan

    TThread issue

    It's a bug for the very reasons that you raised! When the thread was created in the constructor of `TThread` it meant that you couldn't synchronise passing state to the thread before it started.
  18. David Heffernan

    TThread issue

    Creating them non-suspended explicitly does what you wish also.
  19. David Heffernan

    TThread issue

    Do that in the constructor of the thread if you wish. No need to create the thread suspended.
  20. David Heffernan

    TThread issue

    That was a bug fixed in Delphi 6, and one of the reasons for the introduction of AfterCreation. I never create threads suspended.
  21. David Heffernan

    TThread issue

    Yes. What happens if you pass False and so don't create suspended?
  22. David Heffernan

    How to manage defined list values

    I use attributes attached to enumerated types to handle this
  23. David Heffernan

    TThread issue

    Why are you creating the thread suspended. What happens if you don't do that?
  24. David Heffernan

    Shellexecute @ UBUNTU platform

    If I actually disagreed with you, I'd produce a counter example. I don't think I have because I don't think there is one. Therefore I can't believe that I disagree.
  25. I don't think that there was any difference regarding the streams. I think you've just mixed up the begin/end update with the streams and got a bit of cargo cult. FWIW your try/finally is not right.
×