Jump to content

Tom F

Members
  • Content Count

    211
  • Joined

  • Last visited

  • Days Won

    5

Posts posted by Tom F


  1. 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?


  2. 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?

    image.thumb.png.18517862b129b55d9a24647d69e13fe1.png


  3. 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. 3 hours ago, Dwest said:

    I can't give the proper input, as it is real-world locations of people I do not have the appropriate permissions to post, but here is the input modified to remove those coordinates, as well as our API Key.

    https://wps.hereapi.com/2/findsequence.json?&apiKey={OUR API KEY}&start=0;{COORD1}&destination1=1;{COORD2}&destination2=2;{COORD3}&destination3=3;{COORD4}&destination4=4;{COORD5}&destination5=5;{COORD6}&improveFor=time&routeAttributes=summary&mode=fastest;car;traffic:disabled;

     

    Why didn't you edit the input, changing the coordinates so that there is no confidentional information?


  5. 15 hours ago, David Heffernan said:

    I opened Visual Studio the other day and made some edits to a C# module that implements an API interface for our software. We have interfaces in a variety of languages, C++, Python, C#, etc. 

     

    I was blown away when VS offered me suggestions for the code I was writing. Clearly it's using some AI library to do this. Honestly, the quality of the suggested code blew my mind. I knew what I wanted to write, and so did VS. 

     

    This is only going to get better and better, but it's already amazing. So far as I know, there's nothing remotely like this for us Delphi users. Or would we get this is we wrote our code in an editor like VS Code?? 

    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.   


  6. 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;

     


  7. 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


  8. 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:
     

    1. I didn't specify the encoding of the IniFile, which can vary.
       
    2. 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:


    image.thumb.png.eae1aac363ba87746add0855b6f55077.png

     

    image.png.0891651b4f4af369c4db664fb91bb6f0.png

     

    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


  9. 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.)

    Thumbprint.png.c7aeb2cf96c6a432451f0e39ed55380b.png

    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.
     


  10. 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.

     

    image.thumb.png.80648ac6b38f3e550ccdd22d69cd2643.png


    image.thumb.png.9f52151bd23b6e12954af5655a565e5a.png 


  11. 9 hours ago, dormky said:

    ...having a flag for this seems like a hacky way to do something the framework should have a feature for.

     

    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.

     


  12. 8 hours ago, futuron said:

    Maybe the following is a proper solution (at least until Embarcadero gets their act together):

     

    Scaling issue on macOS 14 (Sonoma)
    Using Delphi 11.3 (and probably earlier), apps on macOS 14 (Sonoma) may appear to have the wrong scale, depending on the screen resolution. This is an official workaround based on this Quality Portal report.


    1. Copy FMX.Platform.Mac.pas from the source\fmx folder and put it in the search path for your project, e.g., the same folder as the project, or add the unit directly to your project in project manager. (Remeber to remove the read-only attribute from the file before you start making any changes).
    2. Modify the TMacWindowHandle.GetScale method as follows:

     

    function TMacWindowHandle.GetScale: Single;
    begin
      if TOSVersion.Check(14) and not GlobalUseMetal then
        Result := 1
      else
        Result := Wnd.backingScaleFactor;
    end;

     

     

    This is not mine, I found it on one of the social networks. Normally I would post a link but this forum page flagged it as spam. For that reason I copied and pasted the text.

    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
     


  13. 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.  

     image.png.44a78c4a04142d5307c2b551006faa81.png


  14. 4 hours ago, RaelB said:

    Thanks for trying that. Yes, I am using 10.4. I am using WinLicense to "protect" the exe, so my first suspect would be that.

    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.


  15. 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.

     


      


  16. 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


  17. 6 hours ago, John R. said:

    We've been using WyDay LimeLM for years now with mixed feelings. On the plus side:

    But:

    • I haven't seen such a stubborn company/developers elsewhere: when something is not working correctly, they ALWAYS say that end-user messed up their computer and must re-install everything, or that we, as developers, caused the bug. Never will they admit that it's their fault!

    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!  


  18. 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.

    • Like 1

  19. Hi, David,

    ImageEn may be more than you want to spend on a hobby project. (It was a few hundred dollars several years ago when I bought it.)

    But the announcement below is pretty exciting. Whether you use it or not, I wanted to post this somewhere here so that others who might be interested would see it too, 
     

    Quote

     

    We have just released ImageEn and IEVision, our advanced tools add-in.

    With ImageEn 11.4.0 you can now use the  Google Vision API to recognize objects, text, handwriting, faces, famous landmarks and logos in images.

     

     

    • Like 1
×