Jump to content

Der schöne Günther

Members
  • Content Count

    656
  • Joined

  • Last visited

  • Days Won

    12

Everything posted by Der schöne Günther

  1. Der schöne Günther

    Spring4d and Rio

    There is an (outdated) copy of Spring4D on Github, just for Delphinius: https://github.com/Spring4D/Spring4D I also asked myself that. Not going to complain - Just double-clicky and you're done. But I also wondered if there was another reason beside comfort.
  2. But wouldn't that require the "CallerThread" to support something like this? As far as I know, only the Delphi main thread has something like this, queueing/synchronizing something to a regular TThread has absolutely no effect.
  3. Only who supplies the callback (your TForm1) knows if it's important to have it synced to the main thread or not. So it should take care of synchronizing/queueing it to the main thread, not your TCompressor.
  4. Der schöne Günther

    Flow Diagram as a ProcedureList option

    Wasn't ModelMakerTools for Delphi able to do that?
  5. Der schöne Günther

    Running the Delphi IDE in Microsoft Application Virtualization?

    I find it difficult to keep track of all the different products and technologies. VirtualBox is easy, I got that. Hyper-V appears to be more or less the same, it's a virtual computer running on some host (like my local machine). Then, there is the new Windows Sandbox. And there is "Application Guard" which allows some applications (like a browser) to run in a shielded environment, but display regular windows on my desktop. And then there is "App-V", which has been around since Windows 7, I think. Are they related?
  6. Der schöne Günther

    WinAPI to query if a form is ready to Rock.

    A TWinControl has a method RecreateWnd(): http://docwiki.embarcadero.com/Libraries/en/Vcl.Controls.TWinControl.RecreateWnd Maybe you can have a look at the VCL sources where this gets called...
  7. Der schöne Günther

    WinAPI to query if a form is ready to Rock.

    Wouldn't that be the easiest? I don't see much of a "problem" of how to know when everything is ready. By default, it should be after the first time OnShow (or maybe even OnActivate) has been called. This can be done in your base class. If you need more elaborate logic in one form class, then you can override that behaviour.
  8. Der schöne Günther

    How to wait for a file compression to finish?

    NTFS allows files to be compressed. When a directory is compressed, that just means its files automatically inherit the "compressed" attribute. You can use WinApi.Windows.GetCompressedFileSize(..) to find about how many bytes a file actually uses on disk. When compressed, it is less than the actual file content.# My "problem": When a file is written into a directory with the "compressed" attribute set, it will first get written without compression, then Windows will take care of compression in the background. While I query the "true" file size with GetCompressedFileSize(..), I can see it shrinking. I would like to find out when the compression has finished. Is it possible? In case someone wants to test a running Demo, here is the source for a console application: https://gist.github.com/JensMertelmeyer/eb238ce57f8bb6cbb1ef3514c3d58ae8
  9. Der schöne Günther

    How to wait for a file compression to finish?

    Thanks, I will try that. I didn't notice the file was supposed to be locked, I think it could still be moved around in explorer while compression was taking place but I might be wrong.
  10. Der schöne Günther

    Disaster planning by archiving GetIt installers

    Sorry, I didn't know. That really paints a different picture of the whole situation.
  11. Der schöne Günther

    Disaster planning by archiving GetIt installers

    No Embarcadero "This repo is a copy of our GetIt stuff"-type of thing, I meant the repo of the thing I wanted to use. Clone it, store it offline, never worry again. GetIt is great for quickly trying things out. If you rely on a component, get it from somewhere you can rely on (your own disk).
  12. Der schöne Günther

    Disaster planning by archiving GetIt installers

    A year back or so, GetIt stopped working for 10 Seattle. I opened a support ticket with Embarcadero. I'm glad they were honest and told me they weren't going to fix it and I should download stuff from Github instead. That really showed it's nice for quickly trying something out, but no one knows when it will stop working.
  13. But doesn't that defeat the purpose of using a thread in the first place if there can only be one canvas operation at a time?
  14. Querying a random internet search engine with "Delphi TBitmap Thread", it appears to me as TCanvas is not meant to be used in threads. There are countless threads on this subject.
  15. Der schöne Günther

    RIO: Start Debug Session changes source

    With proper source control you would have seen this immediately 🙃
  16. Der schöne Günther

    RIO: Start Debug Session changes source

    I was talking about a "version control" system that helps you keeping track of what files were changed, when, and why. Notable examples include Git, Mercurial or the good old Subversion.
  17. Der schöne Günther

    RIO: Start Debug Session changes source

    Did you really add your .res file to your project? I think it's an auto-generated one and you should neither have it in source control, nor added to your project...
  18. Der schöne Günther

    Funny Code in System.Types

    I think it was Nick Hodges who called out for Embarcadero to make their unit tests open source and let the community contribute. Unfortunately, not much happened. Personally, I assume that there are unit tests, but only very few. Otherwise, things like that System.Generics.Collections disaster with XE8 certainly wouldn't have happened...
  19. Der schöne Günther

    IDE can not create ancestor TFrame

    I have never done that but thank you for encouraging me! I just found out that, at least in my special case, the IDE runs into this error when you Are using the form designer Edit -> Hide non-visual components (Ctrl+H) Close the project After that, the registry path HKEY_CURRENT_USER\Software\Embarcadero\BDS\17.0\Form Design has "Show NonVisual Components"="False" This appears to be deadly. Just setting this value back to "True" makes my RAD Studio work again. I am on Delphi 10.0 Seattle. Not sure if it also affects other versions.
  20. Der schöne Günther

    IDE can not create ancestor TFrame

    Can you still open the ancestor frame in the form designer? Several times a week, my IDE somehow corrupts itself so that the form designer does no longer work for inherited frames. I then load a backup of my registry for HKCU\Software\Embarcadero\BDS\17.0 and everything is fine again for the next few days. I'm on 10 Seattle. Apart from that, it sometimes also just corrupts the DFM files for a frame. Your version control should be able to show you what happened.
  21. Der schöne Günther

    track process execution

    Your question is relatively vague. I guess the technical definition of "programs executed" means "whenever the WinApi CreateProcess(..) routine is called"? In that case, the Microsoft or MahdiSafsafi libraries are probably the fastest way: https://github.com/MahdiSafsafi/DDetours https://github.com/microsoft/detours/wiki/Using-Detours
  22. You can use the RTTI to evaluate certain properties of interace types. Please see the following snippet: program Project1; uses System.Rtti; var context: TRttiContext; rttiInterface: TRttiInterfaceType; begin context := TRttiContext.Create(); rttiInterface := context.GetType( TypeInfo(IInterface) ) as TRttiInterfaceType; rttiInterface.IntfFlags; // is [ifHasGuid] rttiInterface := context.GetType( TypeInfo(IInvokable) ) as TRttiInterfaceType; rttiInterface.IntfFlags; // is [3]. 3 is not a valid enum value end. You can put a breakpoint on both lines with a comment for evaluating the value of IntfFlags yourself. IInvokable (and every interface that derives from it) has an undocumented value of "3". What does it mean? I have not been able to find anything in the source code. Clearly, System.TypInfo.TIntfFlag is declared as TIntfFlag = (ifHasGuid, ifDispInterface, ifDispatch);
  23. Der schöne Günther

    Undocumented "Interface flag" for IInvokable?

    I wonder where this value actually comes from. I guess not from RTL code that exists as a .pas file?
  24. Der schöne Günther

    Is it possible to know when a TObject is instanciated/freed?

    Maybe this could be related? http://blog.marcocantu.com/blog/2017-june-delphi-packages-creators-update.html
  25. Der schöne Günther

    RadStudio Roadmap 2019

    What's so interesting about that? I still don't get quite behind that language server thing. I see that they will be able to delegate things like Code Completion and Error Insight to some external process in the background. Is that also going to work the other way round? Will tools like VS Code be able to access Delphi's debugger? I am already looking forward to 10.4 because of High DPI. Maybe I will once again be able to use Delphi at home, not just at work.
×