Der schöne Günther
Members-
Content Count
690 -
Joined
-
Last visited
-
Days Won
12
Everything posted by Der schöne Günther
-
Where does Delphi store the list of command line parameters?
Der schöne Günther replied to PiedSoftware's topic in Delphi IDE and APIs
You wouldn't believe how much I crave for them to store the "ignore the following exception types" locally, and at project level. -
Where does Delphi store the list of command line parameters?
Der schöne Günther replied to PiedSoftware's topic in Delphi IDE and APIs
In the Windows registry at Computer\HKEY_CURRENT_USER\Software\Embarcadero\BDS\xx.y\History Lists\hlRunParameters where xx.y is the RAD Studio version(s) you are using -
delphi Twebbrowser Javascript error
Der schöne Günther replied to clubreseau's topic in General Help
Yes, we do. Nothing has changed. You still have two options: Set IE emulation to something newer than 2006 Use an alternative from this decade (like the chromium-based WebView2 engine) -
'for i:= 0 to 4' does 6 loops when not in Debug mode
Der schöne Günther replied to Allan Olesen's topic in General Help
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. -
0/0 => EInvalidOp or NAN ?
Der schöne Günther replied to FabDev's topic in RTL and Delphi Object Pascal
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. -
0/0 => EInvalidOp or NAN ?
Der schöne Günther replied to FabDev's topic in RTL and Delphi Object Pascal
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. -
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
-
Team competition - how to do it
Der schöne Günther replied to Stano's topic in Algorithms, Data Structures and Class Design
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. -
Have any of you worked with Visual C++?
Der schöne Günther replied to 357mag's topic in General Help
Do you, by chance, not mean C++, but C++/CX by Microsoft? -
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.
-
Custom sort of a TList with object references (works in 32 bit, does not in 64 bit)
Der schöne Günther replied to Alexander Halser's topic in Algorithms, Data Structures and Class Design
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) -
generics Destructor of Object in TObjectList<k,v> never gets called despite doOwnsValues
Der schöne Günther replied to omnibrain's topic in Algorithms, Data Structures and Class Design
Not trying to be a smartass, but doesn't the compiler warn you explicitly? Like -
How can I create a smith chart in c++ Builder 11.3 Alexandria
Der schöne Günther replied to kerravon99's topic in VCL
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 -
Why does a stack overflow cause a VCL application to terminate?
Der schöne Günther posted a topic in RTL and Delphi Object Pascal
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. -
Why does a stack overflow cause a VCL application to terminate?
Der schöne Günther replied to Der schöne Günther's topic in RTL and Delphi Object Pascal
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? -
Getting the command line parameters of an executable
Der schöne Günther replied to dummzeuch's topic in Tips / Blogs / Tutorials / Videos
Why? I think that is actually a pretty decent way. -
Sounds like this here to me: https://quality.embarcadero.com/browse/RSP-40939
-
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:
-
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.
-
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)
-
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.
-
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.
-
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.
-
Instead of these hacks, why don't you just disable scroll bars by CSS?
-
You probably might want to read the "Important note about DLL memory management" you just posted.