

Der schöne Günther
Members-
Content Count
746 -
Joined
-
Last visited
-
Days Won
12
Everything posted by Der schöne Günther
-
Good catch, that would have taken me hours as well. For the sake of completion, here is the official documentation on the matter: Threading model for WebView2 apps - Microsoft Edge Development | Microsoft Learn
-
Win32, Win64, WinRT and now... WinARM ?????
Der schöne Günther replied to Juan C.Cilleruelo's topic in Windows API
Not true at all. This was the case around 10 years ago with Windows RT. Yes, there is software that might not run out of the box (like apps based on OpenGL or DirectX), but for "regular users", most software runs without users even realizing it is being emulated. -
Strange problem skipping loop with tTask
Der schöne Günther replied to Jud's topic in RTL and Delphi Object Pascal
Can confirm with Delphi Alexandria 11.1: The program is executed correctly, but the stepping through it with F8 inside the debugger jumps around: It goes like this: Begin SetLength End of method Back to for loop End of method back to the foor loop end of method done I suppose it's some weird kind of compiler optimization or the debugger just setting the breakpoints in the wrong places. -
I learned that the IDE will also get confused when you have two or more projects in a group (call them "A" and "B") and when you have a frame "TMyFrame" in both project "A" and "B". It will sometimes show A.MyFrame in project B and vice-versa, depending on which frame was opened first.
-
Store a large number of images in the filesystem or in a DB?
Der schöne Günther replied to RaelB's topic in Databases
I don't have at hand how you had to set up the TFDConnection (and possibly the Sqlite bridge) with the FireDAC components, but here's a starting point: How To Corrupt An SQLite Database File from Sqlite.org itself. Also, see https://docwiki.embarcadero.com/RADStudio/en/Using_SQLite_with_FireDAC, it's surprisingly helpful: -
Store a large number of images in the filesystem or in a DB?
Der schöne Günther replied to RaelB's topic in Databases
If you have no trouble identifying every item by filename alone, I'd personally go with the raw filesystem. Reason is that you can easily purge older files, add or remove content without going through your application which eventually have to be updated. Not sure about the type of app you're building, but sticking with raw files has often helped me so that a technician on site was easily able to "remove all garbage data from scanner 2 between 13:00 and 13:15" without me adding something like this to the application or editing a big database file. Also you can easily corrupt your sqlite database file with sudden power losses and stuff like this. If you set it up correctly then it doesn't happen, but I think the default settings of FireDAC have the journalling behaviour set up so that it is not robust against power losses. It's a mistake I have unfortunately made more than once. I think NTFS (or at least, Windows Explorer) starts having trouble after around 10.000 files in the same directory. You should definitely have some subfolders that also allow you to group/sort things easier. Like a folder for every new day or something like this. -
Feature req: Compiler unit dependency graph / log with warnings about circularity
Der schöne Günther replied to Lars Fosdal's topic in Delphi IDE and APIs
Yes, I have read that comment, but I am not much wiser. I have honestly never bothered with this, and now I wonder if I should have. The core of the motivation is "Refactor the code, so the compiler trips over its own feet less"? What is "DCU cache stability" Marco mentions? Is it that Delphi often does not register source files updating (for example, by switching version control branches) and then tries to link outdated DCU files in? -
Feature req: Compiler unit dependency graph / log with warnings about circularity
Der schöne Günther replied to Lars Fosdal's topic in Delphi IDE and APIs
Can you elaborate on the motivation? Why should one care about unit interdependency? To speed up compilation? -
Thank you, that clarifies it. I don't think this is intended behaviour and probably a bug.
-
Well, have you tried just having an empty implementation of TMainForm.FormSaveState(..)? I have not tried, but I would assume that when OnSaveSave gets called, you app has already been sent to the background and is about to be suspended within the next few milliseconds. Instead of actually saving something, your code example is now stuck on waiting for a confirmation for a non-visible dialogue. I would assume that the operating system either discards your handler or maybe entirely termiates your app because it appears stuck.
-
That does not sound like intended behaviour. Does that also happen if your implementation of the OnSaveState event is completely empty?
-
Change your CommandLine:= 'c:\windows\system32\cmd.exe /c ping -t 127.0.0.1'; to CommandLine:= 'ping -t 127.0.0.1'; and your ping.exe will properly be terminated. Right now, you are killing cmd.exe which, in turn launched another ping.exe. Of course ping.exe will still be around after cmd.exe got killed. Also, TerminateProcess(..) should always be a matter of last resort. Properly terminating the ping -t command is, as you've found out, sending a [ctrl] + [c] event. You can do that from your own app: GenerateConsoleCtrlEvent function - Windows Console | Microsoft Learn
-
Do you have control over Exe-2 or is it by somebody else? If it is, can you be sure that the behaviour of Exe-2 might be changing in the future?
-
iOS betas hardly change dramatically over the time. By the way, final release is in like 8 weeks. Having a development tool that is now unable to produce working executables, that is worrying, and not wasted time.
-
Run process with normal user privileges from elevated process
Der schöne Günther replied to PawelPepe's topic in Windows API
Just saying: Your source is just a copy from @Remy Lebeau's original post on https://stackoverflow.com/a/37949303 -
Strange debug output
Der schöne Günther replied to pyscripter's topic in RTL and Delphi Object Pascal
That's Microsoft, just casually leaving OutputDebugStr-calls in their release builds. Nothing new here 😑 If you don't use the debug output, you can disable these messages showing up in the IDE. If you do, you will have to get used to your messages being buried under a heap of garbabe. -
ReleaseExceptionObject not working?
Der schöne Günther replied to A.M. Hoornweg's topic in RTL and Delphi Object Pascal
of course, I still haven't created the promised follow-up ticket 😓 -
I made it so that it works both with and without the T as it's more readable without it. [Test] [TestCase('Date, space, time', '1988-10-21 17:44:23.456')] [TestCase('Date, T, time', '1988-10-21T17:44:23.456')] [TestCase('Date, T, time, Z', '1988-10-21T17:44:23.456Z')] [TestCase('Date, T, time, offset (1)', '1988-10-21T17:44:23.456+02:30')] [TestCase('Date, T, time, offset (2)', '1988-10-21T17:44:23.456+0230')] procedure TestDateTimeArgument(dateTime: TDateTime); https://github.com/VSoftTechnologies/DUnitX/blob/c348ea5010822368975c0f10aa1d16969c6ba6bd/Tests/DUnitX.Tests.Example.pas#L68-L74
-
At least more than three🙄. Judging by the readme file, it is newer than September 2016, but as you noticed, older than June 2020 when my change was added.
-
I contributed ISO8601-compliant DateTime parsing to DUnitX: VSoftTechnologies/DUnitX: Delphi Unit Test Framework (github.com) I'd recommend using ISO8601 so that it doesn't depend on the build machine's locale.
-
The maximum size TBits can be before bugging out is Integer.MaxValue - 31. That's roughly 256 Megabytes of consecutive boolean storage spage. You really need that much?
-
I tried. I really did. And then gave up and did it in C++ with the free and widely used open62541 library. I tried using the dlls in Delphi, but always had access violations. The delphi translated headers were correct. Fun fact: I am not the only one who tried and failed. Another Delphi-Praxis member, completely independent of me, also tried, failed and then just did it in .NET. Fehler mit externer DLL, Callback-Funktionen. - Delphi-PRAXiS (delphipraxis.net) [German language] Delphi Externen Prozess starten und beenden - Delphi-PRAXiS (delphipraxis.net) [German language] For me, that was now two years ago and our opc ua server has seen many extensions and is working well. I implemented it as a seperate standalone console application that talks with delphi application via http/rest. I find it very comfortable and easy to debug. A coworker just added a simple opc ua server to his project in Python within an extremely short time. tl;dr: Having a shared interface between Delphi and another binary really was the least challening part for us. I think actually understanding what OPC UA is and what it can do was much harder.
-
It was said it's either argc == 0 argc >= 1, with argc[0] being the first parameter, not the program name/path, as expected I agree that it's more than odd and against everything else I've seen. For sure, nobody enforces it, and you can even omit the program name yourself by using things like CreateProcess(..). However, ISO/IEC 9899 is pretty clear on that: PS: It's probably a regression by this bugfix which was closed in April: https://quality.embarcadero.com/browse/RSP-41397 https://quality.embarcadero.com/browse/RSP-41179
-
macOS Ventura 13.4.1, any comments ?
Der schöne Günther replied to Rollo62's topic in Cross-platform
For my personal machine, I went back to Monterey after trying out Ventura for a week or two. I had terrible problems with Exchange not syncing properly. Not sure if that got fixed properly. Ventura had some nice features I would have liked to use, but the Exchange problem (and I think some problem with scanning/printing) made me roll back. Still looking forward to the next version though 🙂 -
Reading barcodes is not the same as optical character recognition. I suppose what OP is searching for is to use something like tesseract from Delphi.