Jump to content

Lajos Juhász

Members
  • Content Count

    828
  • Joined

  • Last visited

  • Days Won

    11

Posts posted by Lajos Juhász


  1. 30 minutes ago, David Heffernan said:

    Interestingly, if the process has UTF-8 as the active code page (ccchttps://learn.microsoft.com/en-us/windows/apps/design/globalizing/use-utf8-code-page) then you can use AnsiString fine and be fully Unicode compliant. I discovered this by accident lately when my MATLAB mex file, which uses ANSI because MATLAB doesn't do UTF16, unexpectedly started handling Unicode with a recent MATLAB update! The update set this code page in its manifest. 

    Yeah, and breaks FireDAC as it converts from UTF-16 using the language for non-unicode programs instead of using conversion from client locale to server locale.


  2. 8 minutes ago, David Heffernan said:

    Thanks for the correction. The main point stands, namely that Chr(11200) is perfectly valid.

    This is true for strings. However in the example it's used to assign the value to ansistring:

     

    var
      MyAnsiString: AnsiString;

     

    AnsiString is not a unicode string thus there is no chr(11200) most probably the code page of the ansistring will have no conversation for that unicode code point thus will be converted to ?


  3. At least I won this bet. You should always post the parent class as don't everyone will have the complete source. By openning the System.Classes.pas it's clear what to do:

     

    procedure TCustomMemoryStream.SetPointer(Ptr: Pointer; const Size: NativeInt);

     

    change the method signature to match.


  4. You should at least provide a compiler error message. From here we don't know which class it's inherited from.

     

    I don't like to gamble but will make an exception my guess is that you should change the parameters of the method to match the signature from the parent class?


  5. Yes you can, before you compile the package uninstall all the packages that depends on that one. That should improve the situation.

     

    Unfortunately this is a "known" issue and impossible to report (as it's hard to make the required test case).

     

    PS. For a project group I even have a situation that some days Access Violation is almost every time triggered when I compile an application without runtime packages.


  6.  

    uses
      Xml.XMLIntf, Xml.XMLDoc;
    
    procedure TForm1.Button1Click(Sender: TObject);
    var
      MyXMLDocument : IXMLDocument;
      FounderNode : IXMLNode;
    
    begin
      MyXMLDocument := TXMLDocument.Create(nil);
      MyXMLDocument.Active := true;
      MyXMLDocument.Version:='1.0';
      MyXMLDocument.DocumentElement := MyXMLDocument.CreateNode('ab', ntElement,'');
      MyXMLDocument.DocumentElement.DeclareNamespace('xsi', 'https://www.guru99.com/XMLSchema-instance');
      MyXMLDocument.DocumentElement.DeclareNamespace('xsd', 'https://www.guru99.com/XMLSchema');
      MyXMLDocument.DocumentElement.SetAttributeNS('xmlns', '','MyString');
    
      FounderNode := MyXMLDocument.DocumentElement.AddChild('founder');
      FounderNode.NodeValue:='Krishna';
    
      MyXMLDocument.SaveToFile('TestOne01.XML');
      MyXMLDocument.Active := false;
    end;

    You have to set the version and MyString should be the 3rd parameter not the second one.

    • Like 1

  7. 2 hours ago, Al T said:

    Cause I need to be able to use or replicate Vcl.Controls.TWinControl and be able to handle HWND (windows handles) in FMX.

    You can access the windows handle using WindowHandleToPlatform.

    .


  8. 18 minutes ago, Chris-J said:

    Do you know if there's an explanation somewhere on the Embarcadero website of how to distribute the font with my application, as I've not done it before ?   Apologies if I'm missing it / this should be obvious.

    This should be part of the installation of your application. For example Inno Setup can do it for you.


  9. 2 hours ago, alogrep said:

    I do not want to negate those advantages, but as it is the dialog appears too small in higher resolutions. I would like to resize font size according to the screen resolution so that it would appear the same on any resolution.

    Make your application DPI aware and the dialog should be same on every settings.

×