Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Programmieren allgemein (https://www.delphipraxis.net/40-programmieren-allgemein/)
-   -   Delphi 7 32-Bit localization of App does not work (Exception) (https://www.delphipraxis.net/213432-delphi-7-32-bit-localization-app-does-not-work-exception.html)

paule32.jk 28. Jul 2023 19:22

Delphi 7 32-Bit localization of App does not work (Exception)
 
Hello,

I have the following Code-Snip from the reinit.pas of the RichEditor Demo of Delphi 7.
I would like to localisize my Application with different Languages.
I get a exception in the inner "try finally" block.
What did I wrong ?

Edit: woops, English, sollte Deutsch sein !!!

Code:
...
  ResStream := TResourceStream.Create(HInst, ResName, RT_RCDATA);
  try
    AsInheritedReader := TAsInheritedReader.Create(ResStream, 4096);
    try
      Instance := AsInheritedReader.ReadRootComponent(Instance);
      // here, exception occur !
    finally
      AsInheritedReader.Free;
    end;
  finally
    ResStream.Free;
  end;
...
Gruß, paule

Union 30. Jul 2023 13:38

AW: Delphi 7 32-Bit localization of App does not work (Exception)
 
Du solltest ReadRootComponent() nicht aufrufen, das passiert automatisch. Stattdessen:
ReadSignature(), ReadPrefix(), ReadStr(), ReadProperties().


Alle Zeitangaben in WEZ +1. Es ist jetzt 02:29 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz