Autor Beitrag
freedy
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 403
Erhaltene Danke: 1

Winows 7
Delphi XE
BeitragVerfasst: Di 04.11.03 15:42 
Das Thema wurde bereits im Forum behandelt. Trotzdem erhalte ich immer wieder Fehlermeldungen.
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
type 
  { Vorwärtsdeklaration der Klasse TGassnerelement }
  TGassnerElement = class(TGassner);

  TElement = class
  public:
    constructor Create(LVariant : TGassnerElement); OVERLOAD;
  end;

type
  TGassnerElement = class(TGassner)
  public
    constructor Create(Kollektiv, Woehlerlinie : TElement); OVERRIDE;
  end;

Weiss leider überhaupt nicht, wo da der Fehler sitzt. Kriege folgende Fehlermeldung:
Zitat:
* Bezeichner redefiniert

bzw. wenn ich in der Vorwärtsdeklaration den Typ entferne, eine Meldung dass die Klasse nicht vollständig definiert ist.

Moderiert von user profile iconTino: Delphi- und Quote-Tags hinzugefügt; Topic verschoben.
Keldorn
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 2266
Erhaltene Danke: 4

Vista
D6 Prof, D 2005 Pro, D2007 Pro, DelphiXE2 Pro
BeitragVerfasst: Di 04.11.03 15:57 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
  TGassnerElement = class;   <<<<---- nur class;

  TElement = class
  public    <<<<---- public ohne : 
    constructor Create(LVariant : TGassnerElement); OVERLOAD; <<<--- overlaod willst du hier bestimmt nicht, wenn dann Override, geht aber nicht bei TObject
  end;

//type <<<---- das type muß raus

  TGassnerElement = class(TGassner)
  public

probiers mal so,

zusätzliche infos findest du in der delphi-Hilfe (evtl über die Suche gehen und Vorwärtsdeklaration eingeben)

mfg Frank

_________________
Lükes Grundlage der Programmierung: Es wird nicht funktionieren.
(Murphy)
freedy Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 403
Erhaltene Danke: 1

Winows 7
Delphi XE
BeitragVerfasst: Di 04.11.03 18:04 
Danke. Ich werd's gleich mal ausprobieren.

Der OVERLOAD bleibt übrigens, weil der Konstruktor mit ca. 8 Parametern belegt ist. :) Konnte ja keiner wissen.
Sollte auch nur verdeutlichen, wo ich meine Klasse brauchen.
freedy Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 403
Erhaltene Danke: 1

Winows 7
Delphi XE
BeitragVerfasst: Di 04.11.03 19:47 
Super, genial. Klappt. Danke.

Keine Ahnung, was ich jetzt wirklich falsch gemacht habe.
Beim nächsten Mal kopiere ich das einfach. :P
Keldorn
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 2266
Erhaltene Danke: 4

Vista
D6 Prof, D 2005 Pro, D2007 Pro, DelphiXE2 Pro
BeitragVerfasst: Di 04.11.03 19:54 
Ein fieser Fehler war das 2. type. Vorwärtsdeklarationen müssen im gleichen type stehen.

_________________
Lükes Grundlage der Programmierung: Es wird nicht funktionieren.
(Murphy)