Jump to content

corneliusdavid

Members
  • Content Count

    627
  • Joined

  • Last visited

  • Days Won

    11

Posts posted by corneliusdavid


  1. I tried this a few years ago with a Delphi XE application and it worked but we decided not to go with it. The client had very few users and I was only charging T&M so this added an ongoing cost they wouldn't have had previously plus they all had Windows desktop computers anyway so they just left it as it was. It was really cool to see it working though.


  2. 12 hours ago, Jim McKeeth said:

    I had thought about creating an IDE add-in to effectively "lock the form," where it ignores all those "accidental" changes.

    That'd be great. I have tried Delphi's "Lock Controls" (on the Edit menu) but it only lasts for the current session (when you close and re-load, it's off again) and I don't remember to turn it back on. Also, when using Delphi in DPI-Aware mode, there are still changes even when I don't touch anything; I just pulled up a fairly simple form and closed it without moving anything and 12 lines of changes showed up in my Git diff, half were ExplicitXXX properties because I had the GExperts feature off, the others were ItemHeight, ClientHeight, etc.; Using DPI-Unaware mode, nothing changed (thanks, @JonRobertson for that observation!).

    • Like 1

  3. 4 minutes ago, JonRobertson said:

    Until I started using DPI Unaware mode (bds.exe "/highdpi:unaware"). Now it never occurs.

    Oh really!? I hadn't thought of that but I'm starting to use DPI Unaware mode more often because there are constant annoying font size changes almost every other time I click on something or pull down a menu. Here is definitely another advantage.


  4. Here's my new upgrade process after having so many problems in the past:

    • Disable User Access notifications: I do this temporarily to speed up the process.
    • Uninstall all GetIt Packages: Run AutoGetIt, check "Installed Only" then "Refresh Package List", then select "Uninstall checked" in AutoGetIt; optionally saved checked list.
    • Disable/Remove IDE Plug-ins: Start Delphi and using GExperts Expert Manager, disable all experts, including GExperts itself.
    • Remove Third-party Components: Select Component > Install Packages from the Delphi menu and remove all third-party components.
    • Backup FDConnections: make a copy of the FDConnectionDefs.ini in my "public docs"\Embarcadero\Studio\FireDAC folder.

    Run the installer, keeping defaults. After the installer is finished, there are similar steps to get my system set up again:

    • Check the Path: If the Path environment variable is getting too long, create short path substitutions and replace their entries.
    • Restore FDConnections: restore the copied FDConnectionDefs.ini.
    • Reinstall Third-Party Components
    • Re-Enable/Reinstall Experts: A lot of times, I find the previously disabled experts to be re-enabled and working but might have to reinstall some.
    • Reinstall GetIt Packages: If AutoGetIt is still running, simply hit "Install Checked" otherwise, load the saved items then install them all.
    • Re-enable User Access Notifications: Do not forget to keep your system protected against unauthorized installs!
    • Like 1

  5. This will be a good starting point:

    https://docwiki.embarcadero.com/RADStudio/Athens/en/Migrating_BDE_Applications_to_FireDAC

     

    I'm working on a team, migrating several dozen Delphi apps using the BDE to FireDAC and found the reFind utility to help a lot; it even has templates for the BDE-to-FireDAC migration to get you started. I expanded the template a lot to deal with several other facets of our internal migration needs.

    • Like 1

  6. 1 hour ago, Rollo62 said:

    Is this product based on or related to Indy, or just cooperates with Indy, or is completely different, standalone and not-compatible?

    It works with Indy. In programs I have distributed, I give the user the choice of using FTP or SFTP; the FTP is handled with Indy, SFTP with SecureBridge. You can use it independently but SecureBridge does have an "IOHandler" for providing integration with Indy components, both versions 9 and 10.

    2 hours ago, Rollo62 said:

    Are all platforms natively and fully supported (in other places they descibe this not so clear)?

    I have only used it with Windows so cannot speak from experience but their products and support are good and I would expect they are fully supported.

    2 hours ago, Rollo62 said:

    Are any pre-compiled static or dynamic binary libraries or SDKs needed, are they included or are sources included to compile them externally?

    From their help manual:

    Quote

    SecureBridge is an all-sufficient library and it does not require any external files on the target computer.

     

    2 hours ago, Rollo62 said:

    How is SSL ( OpenSSL ) supported, as binary library, or pascal unit?

    From their help manual:

    Quote
    • Full support for the TLS 1.3, 1.2, 1.1, 1.0 protocols without any external units
    • Support for SSL 3.0
    • SSL/TLS advanced configuration options
    • Support for X.509 certificates
    • Complete validation of server certificate chain, including authority and CRL

    I do not have to ship OpenSSL libraries or DLLs with programs I distribute. If there's an update to SSL and clients require newer security protocols, I simply update my SecureBridge components, rebuild the project, and send it out. If I build with packages, I need to include one additional BPL, sbridge290.bpl (for Delphi 12).

     

    If you have more detailed questions, they have good support and are happy to answer pre-sales questions. I've been a Devart customer for many years, having used several of their xxxDAC products.

    • Like 1

  7. 4 hours ago, Ruud said:

    I did not change the Text property in the Panel1_Click .

     

    I changed the ComboBox1.ItemIndex property .

    You're right--sorry; still, like PeterBelow said, it's not a user-triggered change.


  8. 26 minutes ago, Gord P said:

    The main form will not be programmatically hidden (i.e. the main form's Visible property will not be set to false, and its Hide() method will not be called).

    In that case, it's reasonable to expect it will only be called once. What I see a lot of people do to make certain code is only called once is to set a boolean flag to False in OnCreate, then in OnActivate, check that flag, and if false, set it to true and do your one-time code. That way, even if some future part of your program decides to hide the form, you won't have to worry that your code is executed more than once.

     

    28 minutes ago, Gord P said:

    I was just wondering if something in Windows could trigger an OnShow event

    As far as I know, no.

     

    28 minutes ago, Gord P said:

    Simply minimizing and restoring doesn't trigger it.

    Correct.


  9. 3 hours ago, Ruud said:

    But when I click on Panel1 , only the ComboBox1 text is changed into 'Test 1' .
    There's no message box !

    The documentation for TComboBox.OnChange has this note:

    Quote
    Note: OnChange only occurs in response to user actions. Changing the Text property programmatically does not trigger an OnChange event.

     

    3 hours ago, Ruud said:

    What extra statement must be added to the Panel1_Click procedure ?

    I'd extract the case statement from ComboBox1_Change to a separate procedure and call the new procedure from both ComboBox1_Change and Panel1_Click.


  10. You won't find anything about dark mode when managing platforms, you control Dark Mode under Tools > Options > User Interface > Theme Manager.

     

    But if you have a corrupted .ISO, perhaps download it again to see if you can get a better copy; also compare the MD5 hash to make sure it's not corrupted once it's downloaded. Or, just use the web installer instead (if that's practical for your case).

    • Like 1

  11. 5 hours ago, Dany64 said:

    rewriting an old project

    Does "rewriting" include changing the database or SQL? Or are you simply upgrading to a newer version of Delphi?  @Dmitry Arefiev is correct that the problem is that "AUTO_CORRECT" is not a recognized keyword in Interbase. @Lars Fosdal is also correct that it can be emulated. My point is that your problem is not with Delphi, it's with the SQL, which leads me to question what all you're doing in the rewrite.


  12. 3 hours ago, David Heffernan said:

    Is there a reason to use shortstrings?

    Not sure who you're asking. Skrim didn't say he was using shortstring. I put that in the first example as a way to generate the error he saw--but no, I never use them in new code. When I use MyField.Value (as in my second reply), the warning lists "AnsiString" instead of "ShortString" which is what led me to write what I did in the first suggestion, not knowing what code he was dealing with.


  13. 4 minutes ago, Skrim said:

    LOL, I have been using Delphi since version 2 and I did not know that

    Yeah, lots of hidden gems have been added over the years. I don't always read everything in the "What's New" section and also occasionally discover features that have been there for a while!

    6 minutes ago, Skrim said:

    But a lot of these string values are saved to a database field declared in the database as a string with a fixed length, could that be the reason for the error?

    It wouldn't be the underlying database structure but how they're accessed. I often get this type of warning when upgrading old applications (Delphi 5/7/2007) to newer versions where string fields were assigned like this:

    procedure UpdateValues(const NewValue: string);
    begin
      MyTable.StrField.Value := NewValue;
      ...

    The .Value property is AnsiString; simply changing it to use the explicit type eliminates the warning:

    procedure UpdateValues(const NewValue: string);
    begin
      MyTable.StrField.AsString := NewValue;
      ...

     

    • Thanks 1

  14. If you hit F1 on the warning, you'll get the following explanation:

    Quote

     

    Emitted when the compiler detects a case were it must implicitly convert a form of Unicode (a UnicodeString or a WideString) to an AnsiString (or AnsiChar). This is a potentially lossy conversion, since there may be characters in the string that cannot be represented in the code page to which the string will be converted. This warning is on by default.

     

    If you are certain that the data loss mentioned above will not happen, you can avoid this warning. To do this, cast the right operand to the left operand's type manually. Generally, avoid assigning one string type to another.

     

     

    For example:

    var
      s: string;
      code: string[3];
    begin 
      ...
      code := s;  
      ...

    Here, code is declared to be exactly 3 characters and known as ShortString; but s is declared as the default string type, Unicode. If s happens to contain 4 or more characters or happens to contain multi-byte characters, the assignment will lose data. The compiler is warning you about this possibility.

     

    Yes, you can turn off this warning (in Project Options > Delphi Compiler > Hints and Warnings) but I would not recommend it as unforeseen bugs can more easily creep into your code. The except might be temporarily considered when inheriting an old project that has been working for years and compiling generates thousands of hints and warnings and you just want to turn down the noise until you can get the project under control.


  15. SQLite's own documentation lists some reasons why using it might not be the best for every situation.

    11 hours ago, weirdo12 said:

    building a stand alone app that relies on a database

    That's a pretty broad question and could mean anything from a small single-person app with a few records in a couple of tables (where SQLite would be perfect) to a large, multi-user application suite with hundreds of users over a large network with thousands of transactions per minute (where SQLite would be quite inadequate).


  16. I just want to share my similar setup (but with no problems): I also remotely access a physical Windows 11 machine via VPN/RDP. I upgraded from Delphi 12.1 to 12.2 a couple of weeks ago and have no problems with blinking. 

     

    The only thing different is that in order to keep my main computer's internet connection for Teams meetings and personal email, I start up a VMWare machine and connect remotely from there. The VMWare machine is running Windows 10. So basically, it's like this:

    • Windows 11 desktop (three monitors):
      • VMWare virtual machine with Windows 10 on two of the monitors
        • VPN/RDP -> Windows 11 with Delphi 12.2

    Fast internet, fairly new hardware on both ends, all visual options on in RDP, works great.

×