Autor Beitrag
Harry M.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 754

Win 2000, XP
D2005
BeitragVerfasst: Di 19.04.05 18:35 
versuch es mal so:
ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
unit Unit1;  

 
interface  

 
uses  
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,  
  Dialogs;  

 
type  
  TForm1 = class(TForm)  
  private  
    { Private-Deklarationen } 
    procedure sagichnicht; 
  public  
    { Public-Deklarationen }  
  end;  

 
  

 
var  
  Form1: TForm1;  

 
implementation  

 
{$R *.dfm}  

 
procedure TForm1.sagichnicht;  
begin  

 
end;  

 
end.

_________________
Gruß Harry
Et spes me per dies sine te ducat et amor me ferat, si dolor spem tollit.
Luzifer Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 98

WinXP Pro/ Vista
D5 Enterprise/D7 Enterprise/D2005 Architect
BeitragVerfasst: Di 19.04.05 18:36 
ja ich hab das genauso wie in der 1. Variante von Heiko
Heiko
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3169
Erhaltene Danke: 11



BeitragVerfasst: Di 19.04.05 18:36 
wenn du die Prozedur in den interface..implementation-Abschnitt hast, musst du vor der Prozedur im Quelltext noch ein TForm1. schreiben, unter der Voraussetzung, dass du die Prozedur im type Form1 definiert hast (extra für dich Gausi :wink: ).
Luzifer Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 98

WinXP Pro/ Vista
D5 Enterprise/D7 Enterprise/D2005 Architect
BeitragVerfasst: Di 19.04.05 18:39 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
type
  TForm1 = class(TForm)
(...)
    <span style="color: red">procedure test; </span>
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;


in der roten zeile kommt der fehler
Heiko
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3169
Erhaltene Danke: 11



BeitragVerfasst: Di 19.04.05 18:48 
Ja schon, aber der Fehler leigt unten im Quelltext. Schau dir mal mein Beispiel an, dort habe ich das TForm1. auch hinzugefügt.

"Ungenügende Forward- oder External-Deklaration" bedeutet nur, dass Delphi den dazugehörigen Quelltext nicht findet, wodurch er den Fehler oben dir meldet, wo du es richtig deklariert hast.
Heiko
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3169
Erhaltene Danke: 11



BeitragVerfasst: Di 19.04.05 18:50 
@Harry M.: Dein Bsp. kann nicht funktionieren, da du den Prozedurenkopf im privaten Teil geschrieben hast!!!!!!!!! :wink:
Luzifer Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 98

WinXP Pro/ Vista
D5 Enterprise/D7 Enterprise/D2005 Architect
BeitragVerfasst: Di 19.04.05 18:54 
also ich habe jetzt in der form1 erst oben die procedure deklariert (wie oben)

und dann wie heiko sagte bei der procedur selbst "procedure form1.sagichnicht;" geschrieben.... und jetzt sagt er "form1 redefiniert"

p.s. mal so nebenbei: vielen dank an euch alle dass ihr soviel geduld mit mir habt!
Heiko
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3169
Erhaltene Danke: 11



BeitragVerfasst: Di 19.04.05 18:56 
Am Besten schick mal deinen ganzen Quelltext, damit wir effektivre suchen können. Ich hoffe der Quelltext ist noch nicht zu lang (also bitte keine 1500 Zeiler :wink: ).
Luzifer Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 98

WinXP Pro/ Vista
D5 Enterprise/D7 Enterprise/D2005 Architect
BeitragVerfasst: Di 19.04.05 19:01 
hmmm, eigentlich überschreitet er grad die 2500er Marke.... aber ich schreib mal eben die entsprechenden zeilen raus:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
type
  TForm1 = class(TForm)
(...)
    procedure test;
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var (...)

implementation

uses Unit2;

procedure form1.test; //--> Fehler "redefiniert
begin.....end;


ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
Form2:
(...)
uses unit1;
(...)
begin
form1.test;
end;
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Di 19.04.05 19:05 
So sollte es klappen:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
type
  TForm1 = class(TForm)
(...)
    procedure test;
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var (...)

implementation

uses Unit2;

procedure Tform1.test; 
begin.....end;


ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
Form2:
(...)
uses unit1;
(...)
begin
form1.test;
end;

_________________
We are, we were and will not be.
Luzifer Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 98

WinXP Pro/ Vista
D5 Enterprise/D7 Enterprise/D2005 Architect
BeitragVerfasst: Di 19.04.05 19:08 
jungs, ich danke euch! es funktioniert!!!!!!!!!!!!!!!!!!!!!