Jump to content

aehimself

Members
  • Content Count

    1090
  • Joined

  • Last visited

  • Days Won

    23

Posts posted by aehimself


  1. Seems to be like encoding. Make sure that encoding is set properly, and also if the text gets scrambled at logging or not (check .AsBytes property and verify if value is a valid UTF8 / UTF16 / ANSI string)


  2. recenum and tubeenum are initialized automatically by Delphi during the For .. In ... cycle. You don't need to "obtain" them.

     

    Similar to:

    Var
      stringarray: TArray<String>;
      stringenum: String;
    Begin
      [...]
      // stringenum is "uninitialized" at this moment
      For stringenum In stringarray Do
        // stringenum is now initialized and contains the next element in the array
        [...]

    In the original snipplet values are being assigned at:

        For recenum In records Do
        Begin
          [...]
    
          For tubeenum In tubes Do

  3. Based on this, you can use the old paint.exe to force-launch the new Paint 3D:

     

    mspaint "C:\TEMP\A.jpg" /ForceBootstrapPaint3D

     

    As far as I know though even "modern" apps have executables they just reside in unimaginable places somewhere under your local appdata folder.

    Unfortunately though I can not confirm this as Paint 3D is one of the first things I uninstall from a new Windows 🙂


  4. Also, there's no real benefit of copying your memory stream to a string stream and loading it to the IXMLDocument that way; it just adds one more point-of-failure when it comes to encoding (if not specified, TStringStream considers the data to be ANSI encoded):

    constructor TStringStream.Create;
    begin
      Create('', TEncoding.Default, False);
    end;

    What I'd do is save both binary data to the disk and inspect them with a HEX editor. It will quickly reveal the differences what you might have to adjust, like encoding differences, absence / presence of BOMs, etc.


  5. I know, I should write some documentation about most of my stuff...

    Until then, there's a minimum example on how to create a sample update file in this post.

     

    However, I started thinking. If you simply want to show it, why not a simple TMemo, which loads the information from a .TXT file / embedded resource / HTTP?


  6. I started to experiment with Delphi 12 shortly after it came out at work with a fairly large project. It is using ~100 home-brewn components, consists of thousands of frames (with multiple levels of visual inheritance which is a deathbed for Delphi as far as I recall) in about 1,5M LOC (excluding all external packages which we use from DCU).

     

    Until we make the decision to officially switch I'll keep using Delphi 12 as a daily driver, supporting the same codebase as everyone else and in my experience even the unpatched Delphi 12 gave less internal errors than 11.2 (which we are currently on).


  7. You can go extremely hacky and create a "transparent" panel - and simply put all your components on this. Since TPanel is a TWinControl descendant, .BringToFront will work properly on it.

     

    You can use the source here, just change the painting slightly:

     

    Procedure TDimPanel.Paint;
    Begin
      // Omit the call to inherited in general. 
      
      Self.Canvas.Draw(0, 0, _bitmap, 255);  // Might need 0 instead of 255 for opacity - I don't know by heart
    End;

     


  8. The only “issue” I personally experienced with DCPCrypt was string encoding. While a PHP library was working on UTF8, using the built-in functions of DCPCrypt used Unicode - there’s why the end result didn’t match.

    Once I converted my string to UTF8 TBytes and encoded that everything started to work perfectly.


  9. So you use a program to even write the question for you and when we don’t get what you wanted at the first place you get frustrated; am I getting this right?

     

    Don’t forget that this forum is to discuss, share and help one another; not to do what you don’t/can’t even state clearly.

     

    I wish the best of luck with your project. I spent way too much time figuring out what you want.


  10. 35 minutes ago, bdw_nz20 said:

    It can take time to narrow down whats going wrong and where, hence the need for this type of watchdog on the main thread.

    Sure; this is why I added that the same can be implemented between applications. You have a watchdog application which queries your main application via TCP, window messages, mapped files, etc.

     

     The logic is the same, but instead of a watchdog thread you have a separate executable, and instead of a Boolean / TEvent the signaling channel is different.

     

    I personally would go with a window message which your main program has to reply to. Easy to implement on both sides: use SendMessageTimeout in the watchdog and one extra method in the main program.


  11. 1 hour ago, techdesk said:

    I dont understand your post. How does "creating a simple to use VCL component for Delphi"  relate to an IDE within an IDE.
    " Quote- "Silence is the shield of fools"..

    From this:

    20 hours ago, techdesk said:

    A "drop into form" component that allows users to effortlessly incorporate STM32 board functionality into their Delphi projects.

    [...]

    A user-friendly interface featuring a drop-down menu listing popular boards like NUCLEO, DISCOVERY, and BLUE-PILL.

    [...]

    Once configured, users should be able to execute read and write operations with ease, leveraging familiar STM32Cube IDE commands and parameters.

    It probable that AI didn't exactly say what you wanted to, but reading what you wrote tells me you want an IDE within an IDE as component and that makes no sense to me.


  12. 2 hours ago, techdesk said:

    with specialized commands catered to drones equipped with STM32 chipsets.

    Like... through a COM port.

     

    2 hours ago, techdesk said:

    In essence, Delphi empowers you to push the boundaries of what's possible with the STM32 chip, unleashing your creativity and ingenuity to create groundbreaking solutions that defy expectations.

    With an IDE within an IDE? I'm still not convinced.

×