Jump to content

Tom F

Members
  • Content Count

    211
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by Tom F

  1. I hate to ask it because I've seen it asked for years and years. And, now I'm asking it ... again. And, believe me, I've looked and look in the EMB docs online and elsewhere and can't find an answer. When would the installer require me to uninstall 12, as shown below? This happens on the ISO as well as the web installer. Is this typical behavior?
  2. Tom F

    12.1 requiring me to uninstall 12.0?

    I wanted to add that despite many tries over the years, the migration assistant has never worked for me, even the new and "improved" ones provided occassionally. Perhaps if I select to Uninstall on the above screen, The assistant asks if I want to back up settings so I can re-apply them in 12.1?
  3. Tom F

    Alternative to VMWare??

    I'm hoping to use Virtual Box in place of VMWare Workstation Pro for development and testing. I'm hoping its snapshot feature has similar functionality to VMWare's. (And, hey, it's free, AFAIK!) But, to be honest, I don't know much about it yet and I haven't gone much further yet than thinking about it. Here's evidence that VMWare is dying. https://communities.vmware.com/t5/VMware-Workstation-Pro/High-CPU-usage-by-vmnat-exe-after-upgrade-to-VMware-Workstation/td-p/2992063
  4. Tom F

    Could this be an Indy Error?

    Why didn't you edit the input, changing the coordinates so that there is no confidentional information?
  5. Every once in a while, I've tried each of Delphi's custom styles in my D11 Windows app. Every time I try them, the result looks a bit "off" to me. Often, it isn't quite good enough to look professional. I'm not a graphics designer; I don't know anything about choosing a color palette. I believe that EMB has improved its custom styles (and its implementation in the VCL) over the years. Perhaps I was soured by the initial versions if they were really bad. But, sit still seems with my app that there are glitches where the coloring isn't quite right. Perhaps one component wasn't ever polished by EMB. Or maybe one of my TPanels on which there's another TPanel doesn't get properly colored, etc. I know some of this might be because of the non-standard, third party visual components that I'm using: Raize, and Mitov, although both vendors produce wonderful tools, so I doubt this is their problem. Perhaps my placement of visual components is broken. Perhaps the Parent property on some visual objects is wrong after 13 years of adding and removing components to forms. I know I can modify custom styles if the problem is cosmetic. I'm trying to avoid that (or at least reduce) the learning curve and piece-work of patching up problems. What's the consensus on custom styles? Do they work? Are you using them? How much trouble did you have? Are there any specific dark styles from EMB or others that you think work best? Did you have to modify them or your forms, or did they work out of the box? Are there some styles that are so ugly or buggy that they're unusable? Are there any "best practices" around styles? What about styles from third parties like DelphiStyles? Have you used them? I have no problem paying for a custom style if it eliminates work. Are custom styles from third parties higher quality aesthetically? More thoroughly implemented? More likely to work without modification? Are there any other 3rd party vendors of custom styles that you've used?
  6. Delphi will continue to stagnate. I think that AI and IDE support for C# and other mainstream languages will soon make Delphi programmers fall far behind the productivity and quality of their peers.
  7. I'm trying to untangle a mess I created years ago in a macOS FMX program (formerly 32-bit and now Universal ARM 64-bit,) I've always used the current version of Delphi (now 12) and this app goes back 5+ years, so some of these files were created in earlier versions of Delphi and on older 32-bit versions of macOS. For years, my app created an IniFile for my program's use only, using TInifile.WriteDateTime. My two mistakes: I didn't specify the encoding of the IniFile, which can vary. WriteDateTime (AFAIK) uses the global FormatSettings, which can vary. So, I'm trying to figure out a way to reliably read the IniFile's TDateTime regardless of the defaults in effect when it was created or when it is being read. I'm planning for my app to try to open the file in TMemIniFile with different encodings (starting with the machine's default) and read the date with TMemIniFile.ReadString. I will then TryStrToDateTime with different FormatSettings (starting with the machine's default) until I get valid dates. This seems a bit brute force, but I don't know what else to do. My app is almost entirely US, with a few Canadian, European, Australian, and Asian users, so I hope to cover the majority of cases with a few formats. I know this may not give me 100% success. I've attached a sample of an .ini file I'm trying to reliably read. Here it is in UltraEdit in hex and characters: I've never spent much time with Unicode, but I think that the BOM FF FE here means it's Unicode. But when I open the attached .ini file, ReadString fails to find the Section and Identifier. I've tried different encodings in the TMemIniFile.Create. (I'm testing this code in FMX Windows 32.) I feel like I'm chasing my tail at this point. Am I missing something? Any suggestions on how to proceed? procedure TForm1.Button1Click(Sender: TObject); var IniFileDateTimeStr: String; IniFile: TMemIniFile; begin IniFile := TMemIniFile.Create('C:\Junk\Test.Ini', TEncoding.Unicode); // I have tried other encodings too IniFileDateTimeStr := IniFile.ReadString('Version', 'SourceFileDate', 'Missing'); ShowMessage(IniFileDateTimeStr); //<--- Always shows 'Missing' end; Test.ini
  8. Thanks for adding that reference, Remy. I wasn't aware of Delphi's System.DateUtils.DateToISO8601 and siblings, which is exactly what I needed!!! https://docwiki.embarcadero.com/Libraries/Alexandria/en/System.DateUtils.DateToISO8601
  9. Thanks, Remy. I'm glad it wasn't something totally obvious I was not doing! 😉 Even the simple code below (which doesn't use an inifile) fails. I'd call that a genuine bug worthy of my reporting to EMB. Thanks again for your help on this and so many other things. procedure TForm1.Button1Click(Sender: TObject); var DateStr: String; DateTime: TDateTime; begin DateStr := DateTimeToStr(Now); if TryStrToDateTime(DateStr, {out} DateTime) then ShowMessage('Ok result: ' + DateTimeToStr(DateTime)) else ShowMessage('TryStrToDate failed'); end;
  10. Thanks, @Remy Lebeau. I always value your input. I can't get the simple code below to write and then successfully read a date on macOS Sonoma 14.2 on a MacMini (ARM). XCode version 15. Using Delphi version 12. It works fine on Windows 10 running as a 32-bit or 64-bit app. But on macOS, the TryStrToDateTime call returns false I don't doubt that I'm doing something wrong, but I can't figure out what. procedure TForm1.btnCreateClick(Sender: TObject); var MemIniFile: TMemIniFile; Filename: String; DateStr: String; begin Filename := IncludeTrailingPathDelimiter(TPath.GetDocumentsPath) + 'Test123.ini'; MemIniFile := TMemIniFile.Create(Filename, TEncoding.Unicode ); try DateStr := DateTimeToStr(Now); MemIniFile.WriteString('Version', 'SourceFileDate', DateStr); MemIniFile.UpdateFile; finally MemIniFile.Free; end; end; procedure TForm1.btnReadClick(Sender: TObject); var Filename: String; MemIniFile: TMemIniFile; IniFileDateTimeStr: String; DateTimeFromIniFile: TDateTime; begin Filename := IncludeTrailingPathDelimiter(TPath.GetDocumentsPath) + 'Test123.ini'; MemIniFile := TMemIniFile.Create(Filename, TEncoding.Unicode ); try IniFileDateTimeStr := MemIniFile.ReadString('Version', 'SourceFileDate', 'Missing'); finally MemInifile.Free; end; if IniFileDateTimeStr = 'Missing' then ShowMessage('IniFile entry was missing') else if TryStrToDateTime(IniFileDateTimeStr, {out} DateTimeFromIniFile) then ShowMessage('Inifile contained date: ' + DateTimeToStr(DateTimeFromIniFile)) else ShowMessage('TryStrToDateTime failed when called with ' + IniFileDateTimeStr); end; I've included the project source in an attached zip file. I've also attached the .ini file from the Mac. Test123.ini Complete project source.zip
  11. It surprised me to discover that sometimes those settings are changed by users! That's why I want my code to process this file (and others) regardless of machine settings.
  12. Tom F

    Removing String

    @Lars Fosdal Ha! I actually literally LOL-ed on that. ChatGPT has changed my relationship to RegEx. As we know, it's not always correct, but, hey, what a great tool!
  13. It's not easy to figure out for newcomers, which I am. I struggled like you. There are many different ways to use the key, so finding the right way for our simple need (no CI, no server, command line) was quite difficult for me. Hopefully, this can help you: Below are the batch file lines we use. I don't know how much of this applies to you. Paths, app exe filename and ### will of course be different. Tech Support at Sectigo provided great email support on the dongle/key I purchased from them. (I split the single line below into 4 lines to avoid wordwrap on the forum. It's all one line "C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\signtool.exe" sign /sha1 ############################ /tr http://timestamp.sectigo.com /td sha256 /fd sha256 /n "MyCompanyName, LLC" "C:\Users\user1\Documents\Project1\bin\AppName.exe" IF %ERRORLEVEL% NEQ 0 GOTO ERROR1 "C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\signtool.exe" verify /pa "C:\Users\user1\Documents\Project1\bin\AppName.exe" The ### above is the thumbprint of the certificate fingerprint. It's found on the details tab as shown in the attached screen capture. (TBH, I can't recall where I found this screen, whether in the dongle app or a right-click on a certificate file or something.) Something similar can be done in the INNO IDE and command line versions. We have the dongle on a local machine. We have to enter the token password once, the first time we run the above after booting that machine.
  14. Tom F

    Obfuscating secrets

    We use TurboPower's encryption tools (available for free under Tools > Package Manager for these kinds of mild protection from prying eyes. GetKey in the code below just returns the key we use. I'm sure purists will find all sorts of problems with the code below (including the FreeAndNil). But, hey, you do you and we'll do us. This isn't a banking app, it's obfuscation.
  15. Tom F

    How do I execute code after FormShow ?

    We've used a flag for years. It takes, what?, about one minute to implement and has an almost zero risk of being buggy. Our advice is to take the easy road here: use a flag.
  16. Tom F

    macOS Sonoma and UI layout

    The code above indeed does come from Embarcadero. I searched the site for GlobalUseMetal in the past year to find this. See https://quality.embarcadero.com/browse/RSP-42424.
  17. Tom F

    looking for a "special" checkbox component

    The DelphiGroups post I linked to previously mentions That Raize allows customizable glyphs. So, if the grayed out box as a third state is too ambiguous for you, you might check out is TCheckbox to see if you can modify the appearance of his checkboxes in a way that works for you. I was thinking of something like the one below, although I imagine that there are legitimate objections to the ambiguity as well as how difficult it might be to differentiate such a small difference in appearance between the second and third one.
  18. Tom F

    looking for a "special" checkbox component

    A TCheckBox with AllowGrayed set to true has three possible states; checked, unchecked, and grayed according to : http://www.delphigroups.info/2/6/245597.html I thought TRzCheckbox might have more, but the thread seems to think not... Edit: here's the VCL documentation on it: https://docwiki.embarcadero.com/Libraries/Sydney/en/Vcl.StdCtrls.TCustomCheckBox.AllowGrayed
  19. Contact Rafael at WinLicense to see if he's aware of any problems like this. We've used WinLicense since 2011 and are very happy with it although we haven't tried our app on an ARM platform.
  20. Tom F

    Split string on whitespace

    https://docwiki.embarcadero.com/Libraries/Alexandria/en/System.StrUtils.SplitString
  21. Tom F

    Freeing a non-modal form

    How can a non-modal VCL sub-form notify its owner that the user has closed it so the owner can free it? If the non-modal form's OnClose event calls its owner, the owner can't free the form at that time because the non-modal form's OnClose event is still being run.
  22. Wow! I'm sorry you'll miss out on what we've found to be an extremely reliable company and a wonderful tool for us. I hesitate to say more, because I don't want to sound combative or like a shill for the company. Because I'm neither of those. I can only report our experience, which has been excellent. And of course, YMMV. I understand your caution, David. Each company has its own decision-making process, level of due diligence, and degree of risk aversion. We, of course, went through a similar decision-making process before we selected Oreans. Perhaps your bullet points are insurmountable obstacles for you. I'm not going to spend a lot of time here carefully wordsmithing a reply, but, quickly, here's what I thought to myself when I read your bullets: "No legal information." I understand your hesitation on this. Maybe you could reach out to the owner, Rafael, to discuss your concerns. Static and "too good to be true website" Yes, their website hasn't changed in years. Like many developers, he's not a strong marketer. I have never encountered any inaccuracies on the site. "No forum" I've always gotten excellent support via email. Sure, a forum is always nice to have. And I am a big forum user when they're available. But, TBH, the absence of a forum hasn't been an issue for us. This isn't an enormous product where communicating with other users would provide a lot of value to me. "Site is .php" Like you said, this isn't a big deal. See bullet 2. Anyway, I wish you all the best in your product development. Tom
  23. Wow. Reading their support blog, their bad attitude comes through clearly. They're likely a bunch of arrogant programmers with no business sense, all the while being sure they're god's gift to earth!
  24. Like others, we use https://oreans.com/WinLicense.php. We've been using it since 2012 and have gotten great support when we needed it. It's a stable, well-respected product that never triggers virustotal or other malware detectors. As part of their product, they include a CRM database. We preferred to create our own, and use their DLL locally to generate software keys. It's less than US $500. We consider our having selected it as having been a good technical and business decision.
  25. Not specifically a Delphi question: I wrote a program that reads a registry entry of someone else's program, "ProgramX". When I install ProgramX on my Win10 machine, I find ProgamX's registry entries where I expect them: Computer\HKEY_CURRENT_USER\SOFTWARE\CompanyName\ProgramX. However, when a user of my program installed ProgramX on their computer, my program doesn't find that registry entry. The user tells me he used RegEdit to find the entries here: Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\StorageDevicePolicies\SOFTWARE\CompanyName\ProgramX. The user is 12 time zones away from me and speaks a different language, so it is difficult to communicate with him. I have googled "CurrentControlSet" but am unable to find anything that explains why CurrentControlSet exists. Is it created explicitly by an application, or is it created automatically by Windows, and why? Is it only created on certain machines, perhaps when there is more than one Windows login? Is reasonable for my program to check the HKEY_CURRENT_USER path for the key and if not found, try to find the registry entries in the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet path?
×