Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Algorithmen, Datenstrukturen und Klassendesign (https://www.delphipraxis.net/78-algorithmen-datenstrukturen-und-klassendesign/)
-   -   Delphi Wie Fehler E2574 umgehen? (https://www.delphipraxis.net/199132-wie-fehler-e2574-umgehen.html)

Benmik 27. Dez 2018 00:31

Wie Fehler E2574 umgehen?
 
In CCR.EXIF gibt es (Version 1.5.3) folgende Deklaration:
Delphi-Quellcode:
  TIPTCStringArray = type Types.TStringDynArray; //using 'type' means the helper defined below will only apply to it

  {$IFDEF XE3+}
  TIPTCStringArrayHelper = record helper for TIPTCStringArray
    class function CreateFromStrings(const Strings: TStrings): TIPTCStringArray; static;
    function Join(const Separator: string): string;
  end;
  {$ENDIF}
Das gibt "E2574 Instantiierter Typ kann nicht für TYPE-Typdeklaration verwendet werden", was schon himitsu nicht gefallen hat.

Wie kann man das heilen?

jaenicke 27. Dez 2018 05:55

AW: Wie Fehler E2574 umgehen?
 
Vermutlich wird es erst einmal mit record helper for TStringDynArray gehen...

GPRSNerd 27. Dez 2018 10:41

AW: Wie Fehler E2574 umgehen?
 
Zitat:

Zitat von Benmik (Beitrag 1422156)
In CCR.EXIF gibt es (Version 1.5.3) folgende Deklaration:
Delphi-Quellcode:
  TIPTCStringArray = type Types.TStringDynArray; //using 'type' means the helper defined below will only apply to it

  {$IFDEF XE3+}
  TIPTCStringArrayHelper = record helper for TIPTCStringArray
    class function CreateFromStrings(const Strings: TStrings): TIPTCStringArray; static;
    function Join(const Separator: string): string;
  end;
  {$ENDIF}
Das gibt "E2574 Instantiierter Typ kann nicht für TYPE-Typdeklaration verwendet werden", was schon himitsu nicht gefallen hat.

Wie kann man das heilen?

Das Problem hatte ich vor ein paar Wochen auch schon und eine Lösung in der DP-EN gepostet:

https://en.delphipraxis.net/topic/35...-throws-e2574/

Bisher sehe ich keine Probleme oder Seiteneffekte...

Benmik 27. Dez 2018 12:24

AW: Wie Fehler E2574 umgehen?
 
Ich habe es jetzt einfach zu
Delphi-Quellcode:
TIPTCStringArray = Array of String;
geändert.
Vielen Dank!


Alle Zeitangaben in WEZ +1. Es ist jetzt 22:09 Uhr.

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