Autor Beitrag
lord.paddington
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 76



BeitragVerfasst: Di 20.02.07 17:05 
Hallo!

Ein Progrämmchen, mehrere Units:

In Unit3 gibt es die Variable OGW: Real als public deklariert
In Unit1 gibt es eine Sprunganweisung in eine Procedur zu Unit6; In Unit1 ist Unit6 unter uses eingebunden

Der Compiler meckert 2x



ausblenden Delphi-Quelltext
1:
2:
3:
4:
If ProzentNOK > OGW then //[Error] Main.pas(101): Undeclared identifier: 'OGW'
  begin
    TForm6.Button1Click(Self);//[Error] Main.pas(106): This form of method call only allowed for class methods
  end;



Warum ist OGW unbekannt?

Warum kann ich nicht springen?

_________________
pfutsch ist hin und hin ist pfutsch
jakobwenzel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1889
Erhaltene Danke: 1

XP home, ubuntu
BDS 2006 Prof
BeitragVerfasst: Di 20.02.07 17:10 
Die Variable ist unbekannt, weil entweder die Unit nicht eingebunden ist, oder die Variable unter implementation liegt.
Beim anderen Fehler muss es Form6 und nicht TForm6 heißen.

PS: Sprunganweisung hört sich irgendwie komisch an, wo haste denn den Begriff her?

_________________
I thought what I'd do was, I'd pretend I was one of those deaf-mutes.
Martin1966
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1068

Win 2000, Win XP
Delphi 7, Delphi 2005
BeitragVerfasst: Di 20.02.07 17:13 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
If ProzentNOK > OGW then //[Error] Main.pas(101): Undeclared identifier: 'OGW'
  begin
    TForm6.Button1Click(Self);//[Error] Main.pas(106): This form of method call only allowed for class methods
  end;


TForm6 ist die Klasse. Du musst aber die Variable angeben. Wahrscheinlich lautet die Form6

Lg Martin

_________________
Ein Nutzer der Ecke ;-)
lord.paddington Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 76



BeitragVerfasst: Di 20.02.07 17:23 
herrjeh, wie peinlich

_________________
pfutsch ist hin und hin ist pfutsch
Martin1966
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1068

Win 2000, Win XP
Delphi 7, Delphi 2005
BeitragVerfasst: Di 20.02.07 17:53 
Ist bestimmt jedem schon mal passiert. ;-)

_________________
Ein Nutzer der Ecke ;-)