Der schöne Günther
Members-
Content Count
693 -
Joined
-
Last visited
-
Days Won
12
Everything posted by Der schöne Günther
-
Build / Output messages filtering plugin
Der schöne Günther replied to CoMPi74's topic in Delphi IDE and APIs
I had the same use case a few months ago, and I was glad to find out that you can at least easily select, copy & paste the compiler output as text lines. Writing yourself a tool that filters the output (for example, by unit or severity) should be trivial. The extra step to select, copy & paste might be annoying, but better than nothing. -
take a look to this REST API Server
Der schöne Günther replied to RDP1974's topic in Network, Cloud and Web
I remember taking a look at horse, but dropped the idea of using it because - back then - it looked like a lot of stuff bundled into one giant repo, i think it even had another library as a dependency. It seems they have changed that: At first sight, everything looks much more structured and clean up. I think I will take a look at it again. -
Program using FDTable that works on my computer, but not on others... (Database)
Der schöne Günther replied to DesadaptadoDimensional's topic in General Help
You seem to be using FireDAC to access a Microsoft Access file. I don't understand the language you have on screen, but entering the terms "ace dsn jet" from your error message into an internet search engine reveals that the computer you're trying to run it on does not seem to have the necessary ODBC drivers for accessing the database file. Does installing the following help? Download Microsoft Access Database Engine 2016 Redistributable from Official Microsoft Download Center PS: The Windows "Sandbox" is a great feature to test if your program runs on other machines that do not have additional software installed (requires Windows Professional, I think). -
FireDAC: Need help understanding "ConnectedStoredUsage"
Der schöne Günther posted a topic in Databases
So I have something very simple: A TFDConnection, a TFDTable, TDataSource and TDBGrid. Both connection and table have a property ConnectedStoredUsage: As far as I understand, I should be able to Set both connection/table to "active"/"connected" And remove the auDesignTime flag from the ConnectedStoredUsage property so that the form designer will not connect to the database, but the running application will. The problem is: Because both connection and table are not active on the form designer, their properties Connected = True and Active = True will not get saved into the DFM file! Modifying the DFM file with notepad, adding "connected = true" and "active = true" yields exactly the result I'd expect: It will not connect on the form designer, but the running application will connect. As soon as I the form is modified within the IDE, it will once again remove the Connected = True and Active = True from the connection and table. What am I missing? I'm sure this is not working as intended. -
FireDAC: Need help understanding "ConnectedStoredUsage"
Der schöne Günther replied to Der schöne Günther's topic in Databases
Yes, it does. But it indicates it also works the other way around, but it doesn't. I think I'll file a bug report. -- https://quality.embarcadero.com/browse/RSP-34216 -
OmniPascal: Auto-Implementation of methods not working
Der schöne Günther posted a topic in Delphi Third-Party
OmniPascal appears to be having auto-completion since 2015: However, this option does not exist for me - There is no quick fix available: Any idea what I might be missing? Code completion is working fine, by the way. Update: Turns out the file must be saved to disk first, then it's working. -
FireDAC: Need help understanding "ConnectedStoredUsage"
Der schöne Günther replied to Der schöne Günther's topic in Databases
FireDAC sources do come with RAD Studio, what am I missing? 🤔 However, yes, the RAD Studio documentation in general is a pretty sad sight. -
OmniPascal: Auto-Implementation of methods not working
Der schöne Günther replied to Der schöne Günther's topic in Delphi Third-Party
In the meantime, I have found out that the file needs to be saved to disk for auto-implementation to work. I was not aware of that. 🤦♂️ It's the first time I'm using Omni Pascal beyond for actual compiling/running unit tests. So far, I had only used it as a simple editor to write code, then copied it back into Delphi. -
FireDAC: Need help understanding "ConnectedStoredUsage"
Der schöne Günther replied to Der schöne Günther's topic in Databases
Of course, but I really wonder what this property is intended for. So far, it seems you cannot use it to achieve what it advertises and is therefore broken. -
OmniPascal: Auto-Implementation of methods not working
Der schöne Günther replied to Der schöne Günther's topic in Delphi Third-Party
Perhaps I should, yes. But I am not sure if @Wosi is still maintaining OmniPascal and I don't knonw yet if I overlooked something or if it's a bug. -
Thank you for clearing this up. Absolutely. As far as I understand, an OV certificate might be sufficient for Freeware tools, but for something you sell, it seems it should most definitely be an EV one. An alternative would be using the App store which is something I am considering. Cost is a one-time fee of 100 US $ for a company developer account, after that, Microsofts infrastructure takes care of hosting, certificates and so on.
-
@DelphiUdIT, can you give us a product name? Sounds interesting, especially the costs. I also still struggle to understand if an EV certificate is really good for anything besides drivers. I don't have a source at hand, but I remember that Microsoft SmartScreen will automatically grant an EV signed application a higher reputation than with a regular certificate. PS: MSIX files MUST be signed, there's no way around it.
-
I might be missing something, but I think your topic title is misleading. An application "demands" elevation if it does so through its manifest or Windows thinks it should have elevation (for example, when it's named "setup.exe"). In your case, it's "I get a runtime exception when the app is not elevated. When it is, it appears to be fine". PS: I think the Windows "Sandbox" is a nice feature to check something out on a fresh installation. No need to roll back virtual machines.
-
How to deal with running async / await during application close
Der schöne Günther replied to merijnb's topic in OmniThreadLibrary
That depends on how your application is designed. I think we once had some discussion like that here. My viewpoint is: Do what you have to be doing (like saving stuff to disk), then terminate. Skip the VCL forms destructors and all that. Just end. I vote for "Abort whatever is runnig async". Let me quote Raymond Chen (altough taken slightly out of context here): Source: When DLL_PROCESS_DETACH tells you that the process is exiting, your best bet is just to return without doing anything | The Old New Thing (microsoft.com) Source: Windows doesn't close windows when a user logs off; that's your call | The Old New Thing (microsoft.com) -
anyone working with MS Graph API - OneNote, OneDriveForBusiness
Der schöne Günther replied to Jasonjac2's topic in Network, Cloud and Web
I had a look at it, but never got started because it did not support my use case*. The REST api documentation seemed very ok. Example: Working with files in Microsoft Graph - Microsoft Graph v1.0 | Microsoft Docs However, I found it unnecessary difficult to get started because you had to register an "app permission" on your companies Office 365. I was able to do that (altough I have no special permissions), but still found everything around that unecessary difficult if you're not a SharePoint administrator. * I wanted to upload files to Sharepoint anonymously, which it does not support. OneDrive for Business, however, has a feature called "request files" but it seems unavailable from Graph. -
Delphi 10.4.2 always recompiling in IDE
Der schöne Günther replied to Dave Novo's topic in Delphi IDE and APIs
Are you sure it's compiling? For me, it's always linking the same exe over and over again, even if you just change a command line argument in the debugger. But compilation, no. -
Are there any experiences with www.experts-exchange.com ?
Der schöne Günther replied to Rollo62's topic in General Help
I like how it took them years to realize that expertsexchange.com was generally read as "expert sex change". -
In that case I'm not sure if spending too much time with TTouchKeyboard is even worth the hassle. Design your own English keyboard on a TFrame, you have full control and flexibility here.
- 5 replies
-
- delphi
- ttouchkeybaord
-
(and 1 more)
Tagged with:
-
That's what I do as well: I just change the systems keyboard layout so the TTouchkeyboard will follow. When not longer needed, you can also unload the English keyboard layout again so it will not show up ion the users language list ([Win] + [Space]). I am doing a kiosk application however. I also wouldn't be comfortable with doing that in a regular application...
- 5 replies
-
- delphi
- ttouchkeybaord
-
(and 1 more)
Tagged with:
-
TJsonTextWriter out of memory
Der schöne Günther replied to jhoward1801's topic in RTL and Delphi Object Pascal
In that case, I would probably resort to writing them to a string "by hand" and flushing the string to disk every few megabytes (or using a TBufferedFileStream). -
Getting Exception stack trace in 2021
Der schöne Günther replied to Wagner Landgraf's topic in RTL and Delphi Object Pascal
No, it doesn't. It's just a DLL with no further dependencies. Internally, it might leverage something from the JCL, but it's just a binary 🤷♂️ -
Getting Exception stack trace in 2021
Der schöne Günther replied to Wagner Landgraf's topic in RTL and Delphi Object Pascal
That does the job of acquiring the stacktrace, yes. This often goes hand in hand with the question "How do I act whenever an exception happens so I can, for example, log them". To intercept both operating system and Delphi exceptions, it should be enough to point System.ExceptObjProc and System.RaiseExceptObjProc to an own handler. -
Getting Exception stack trace in 2021
Der schöne Günther replied to Wagner Landgraf's topic in RTL and Delphi Object Pascal
That's is what we usually do. Initially, we had the good old JCL. It was the only thing we used it for. Later, we figured out we don't really need it at all, it was sufficient to hook into a System.ExceptObjProc (and one or two other procedure variables) to point to our own exception handler. There, you can easily acquire the stack trace with with FastMM_Fulldebugmode.dll. It exports three handy methods to acquire the "frame based" and "raw" stack trace and, of course, to just get a string for the textual representation. Internally, the binary also uses the JCL, but can be recompiled to use Eureka or madExcept. At least, it saves us from installing the JCL at all, and the DLL is just a few kilobytes. Pretty happy with that, since we also have full control of how the stack trace is formatted and what happens with it, once an exception gets raised... -
What is the correct approach to "phone home"?
Der schöne Günther posted a topic in Project Planning and -Management
Consider the following scenario: A full-screen Win32 application (Delphi, mostly) which must run 24 / 7. The computers are located inside a factory. They generally have internet access, but might have pesky company firewalls. Since the computers need to run 24/7, they never get Windows updates. We still have to support the earliest versions of Windows 7, for a few years to come Requirement: When the user actively requests it, gather some data, zip it, and "send it to our technical support department" This is what I call "phone home": I want the running application to send data (a single ZIP file) to our companies support department. There are a few thousand installations worldwide. They are not authenticated against anything, they're running local Windows accounts. So far, this has been done by using Delphi's Indy library to send an email to an old Exchange server of ours, by SMTP. I had taken the email approach because it will end up directly in the inbox of our support department. The downside of this method is that More and more companies are blocking outgoing SMTP traffic. They probably suspect spam. Some security solutions will even fake our servers reply and indicate success although the email never got sent. Our company wants to shut down our old in-house email server I am now looking for an alternative approach. Here is what I can think of: (1) Set up an FTP server, upload files there Advantages: The FTP server is under our control and will be running as long as we want to Our application can properly report upload progress Disadvantages: No experience with how likely this will be blocked by company firewalls Our service department will still have to be notified that something arrived at all. Either by email, or other means. (2) Post stuff to our SharePoint / Microsoft Teams Advantages: Posting text messages from the "outside world" (meaning: no authentication) to a channel in the support team works like a charm Disadvantages: When Microsoft breaks this API, it won't be working anymore I have found absolutely no way of uploading files to our SharePoint server anonymously. APIs like "Microsoft Graph" seem to be centered around authenticated ActiveDirectory/Azure users, and do not allow public access (3) Setup an own web server and POST data to this Advantages: It can probably be automated so that after successfully POSTing a file, an email or some other kind of notification gets sent to our department Disadvantages: No developer in our company knows anything about how to properly do web stuff (PHP?). (4) Setup a new, simple email server and continue as always Advantages: Existing software will continue to work Disadvantages: Lots of companies will block outgoing SMTP traffic and it just won't work (5) Drop "phone home" entirely Query the operator to download the ZIP file to a USB drive, go elsewhere, and send it to us Advantages: None Disadvantages: Too much hassle so many operators simply won't bother In order to access the USB port, operator will have to unlock and open an electrical cabinet which is, in some countries, limited to special personnel. What are your thoughts? Did I miss an obvious option? Thanks for taking the time to read. -
What is the correct approach to "phone home"?
Der schöne Günther replied to Der schöne Günther's topic in Project Planning and -Management
Thank you all very much for the replies so far 👍 I hope I can convince the management to host a native server here inside the company and make it accessible with a constantly open port. Just like the Exchange server they want to shut down. With a server in house, we could have full control about what is going on and could basically run any application there. I didn't really think about that. I had my mind on that external server that hosts our web page. I think it can only do PHP.