Jump to content

Der schöne Günther

Members
  • Content Count

    662
  • Joined

  • Last visited

  • Days Won

    12

Everything posted by Der schöne Günther

  1. Der schöne Günther

    'for i:= 0 to 4' does 6 loops when not in Debug mode

    Well, does it? To me, it sounds like the compiler is doing some optimization, and you're confused by what the debugger is temporarily showing, while stepping through the loop.
  2. Der schöne Günther

    0/0 => EInvalidOp or NAN ?

    But that is not a full project. Maybe the full project had something like a fancy graphic/charting library? Some other kind of 3rd party dependency? That is what I'm trying to say. If you are working on a stand-alone project, you will need to find out what is changing this inside your application. If you are working on a library, you will either have to make sure that your code is always operating with the FPU mask it was designed for. Or, if that is not an option (FPU mask modification is a costly operation), then make it very clear in the documentation that the caller is responsible. I have never heard that Windows sets the FPU mask differently for processes. However, I haven't been able to find much about it. I'd expect the Delphi RTL to set it at startup, but I haven't checked if it does.
  3. Der schöne Günther

    0/0 => EInvalidOp or NAN ?

    Sorry to be so persistent, but is it really that exact same project that you posted, which reports differently at some of your clients machines? Or just your "real" project? I've had the FPU mask getting changed behind my back by 3rd party dependencies like printer drivers or ActiveX plugins running in the TWebBrowser. But in your example, there should be no third party code at all.
  4. Der schöne Günther

    How to clear the cache in TEdgeBrowser

    Embarcaderos documentation calls it a „folder to be used for the cache“ and I think that is misleading. You might want to read Microsofts documentation, which is pretty well-written and starts here: https://learn.microsoft.com/en-us/microsoft-edge/webview2/concepts/user-data-folder Also of interest: https://github.com/MicrosoftEdge/WebView2Feedback/blob/main/specs/ClearBrowsingData.md
  5. Der schöne Günther

    Team competition - how to do it

    Maybe the heat is killing me, but I can't follow how some GUI elements (Labels, Checkboxes) go together with booleans, tags and "round type"s. Are you looking for recommendations of how to display this tournament process on screen? Do you want to know how to best store matches in a relational database? I have no idea. You probably have some written requirements, like a formal document or user stories. This should then enable you to figure out how your data works inside your application.
  6. Der schöne Günther

    Have any of you worked with Visual C++?

    Do you, by chance, not mean C++, but C++/CX by Microsoft?
  7. Der schöne Günther

    Optimization On or Off ?

    I second that. Make absolutely sure your mapfile is up to date and it is built at all. Not sure if you just toggled compiler optimisations, or switched from "Debug" to "Release" preset. I think (might be wrong) that by default, the "Release" preset doesn't even create a map file.
  8. It's not TList<T> from System.Generics.Collections. It's the age-old TList from System.Classes. Straight from the documentation: System.Classes.TList.Sort - RAD Studio API Documentation (embarcadero.com)
  9. Not trying to be a smartass, but doesn't the compiler warn you explicitly? Like
  10. Der schöne Günther

    How can I create a smith chart in c++ Builder 11.3 Alexandria

    I am not familiar with that kind of chart, but TeeChart for VCL has it. smith.png (919×526) (steema.com) You will need to acquire the Pro version. Steema | Feature Matrix TeeChart VCL / FMX
  11. Consider this complete VCL application (Form1 & Button1): unit Unit1; interface uses System.SysUtils, System.Classes, Vcl.Forms, Vcl.StdCtrls, Vcl.Controls; type TForm1 = class(TForm) Button1: TButton; procedure Button1Click(Sender: TObject); end; var Form1: TForm1; implementation {$R *.dfm} procedure causeStackOverflow(); begin causeStackOverflow(); end; procedure TForm1.Button1Click(Sender: TObject); begin causeStackOverflow(); end; end. Clicking the button causes the application to hang for a bit, then the debugger will break on a EStackOverflow exception. That's totally expected. But directly after that, the application tries to display its regular error dialog, causing an access violation and then silently crashing. This is the callstack: It will then cause an access violation in user32.dll repeatedly and then crash. I have no idea why. 64 Bit is fine, by the way. It just happens with 32 Bit .exe.
  12. Der schöne Günther

    Why does a stack overflow cause a VCL application to terminate?

    Good catch, it does. Absolutely, but I expected it to recover from it by popping the stack to the next exception handler and proceeding as usual. Does that mean a stack overflow in the main thread should generally be seen as non-recoverable and game over?
  13. Why? I think that is actually a pretty decent way.
  14. Der schöne Günther

    MacOs Ventura and NaN

    Sounds like this here to me: https://quality.embarcadero.com/browse/RSP-40939
  15. Der schöne Günther

    TWebBrowser: Remove Scrollbars not working

    You need to get familiar with how TWebBrowser works. It can either use Internet Explorer or Microsofts Chromium-based "WebView2" runtime, if it is installed and your application has the "WebView2Loader.dll" in its path. If you are using Internet Explorer mode (and probably running in IE 7 mode), then you are correct, it will still show vertical scrollbars although the CSS says otherwise. In that case (if you really want to stick with the old Internet Explorer mode), you will need the non-html conforming <body scroll="no"> which Internet Explorer will understand:
  16. Der schöne Günther

    Set pipeline between UI and cmd.exe

    Many thanks, that ist most helpful. I'll give it a read. I remember a system completely hanging up because one process had hundred thousands of handles it didn't close properly, then spawning a child process and trying to inherit all handles to it.
  17. Der schöne Günther

    Set pipeline between UI and cmd.exe

    A ready to use solution (which I have never tried) is TurboPack/DOSCommand: This component let you execute a dos program (exe, com or batch file) and catch the ouput in order to put it in a memo or in a listbox. (github.com) It is said to be available throught "GetIt" as well. For myself, I did it as also suggested by this fine gentleman here For the processes I spawn myself (via CreateProcess()), I just create two pipes and then use WriteFile(..) and ReadFile(..) on them. It is important that CreateProcess(..) has its "inherit handles" parameter to true. If you're stuck, I might post my solution, but it contains a a lot of noise as well (such as moving the created process to a "job object" to allow easier resource scheduling or termination)
  18. Der schöne Günther

    Set pipeline between UI and cmd.exe

    There is plenty of examples on how to do this with Delphi, you already got the correct term: It's (inter-process) communication (IPC) via "pipes". I'd recommend to start a bit more humble by making a small console app by yourself that will, for example, take two numbers from the input, and return the sum of these two numbers. Then, try sending these two numbers to your console app and getting the result back. If that works, you can do that with your free pascal compiler. By the way: Cmd.exe is nothing more than a front-end that just does what your application wants to do. You don't need to "connect" to a cmd.exe. You will directly launch and communicate with your free pascal compiler.
  19. Der schöne Günther

    Working with PDF files??

    So what? Also, the web browser for "surfing the internet" got nothing to do with how you want to display PDF files within your application. You should get familiar with the WebView2 runtime for your trusty old TWebBrowser. I'd strongly recommend.
  20. Der schöne Günther

    Working with PDF files??

    Why don't you just use a WebView to display the PDF? It can enable/disable zoom by gestures/touch/hotkeys, and set the general zoom level, but I think it cannot zoom in on a specific part of the PDF, like you can with two fingers on a touchscreen.
  21. Der schöne Günther

    TWebBrowser: Remove Scrollbars not working

    Instead of these hacks, why don't you just disable scroll bars by CSS?
  22. Der schöne Günther

    NetHTTPClient

    You probably might want to read the "Important note about DLL memory management" you just posted.
  23. Der schöne Günther

    Choosing a Mac

    Thank you for your experience. I couldn't have told.
  24. Der schöne Günther

    Choosing a Mac

    Exactly the same configuration I am also considering. If you have something to share about your experience, please do tell.
  25. Der schöne Günther

    Choosing a Mac

    Can you give a rough estimate what you consider "enough" for both RAM (probably 16+ GB) and disk? I am not familiar with Parallels, and how its VMs tend to grow in size. PS: I found it surprisingly convenient to go the other way: Use the Mac as my main computer and remote into an old PC (hosting my Delphi Hyper-V machines) for doing Delphi stuff.
×