Autor Beitrag
dnk05
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 40


D3 Prof
BeitragVerfasst: Do 03.11.05 17:59 
Hallo.

In einem Programm von mir habe ich die eigene Prozedur procedure PunkteAnzeigen;
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
procedure PunkteAnzeigen;
begin
  zielleft := LabelZiel.Left;
  zieltop := LabelZiel.Top;
  if (hoehe >= zieltop) AND (kreuz <= (zielleft + 36)) then
    begin
      gewonnen := gewonnen + 1;
      LabelZiel.Caption := ('Du hast bis jetzt '+ IntToStr(gewonnen)+ ' Punkte!');
    end;
end;


Diese rufe ich in einer Button-Prozedur unten auf.
Beim Abspielen des Programm kommt der Fehler "Undefinierter Bezeichner: 'LabelZiel'"

Kann mir bitte jemand weiterhelfen und sagen was ich beachten muss?
Muss ich das Label in der Prozedur irgendwie definieren?
Das Label heißt 100%ig so, ist also kein blöder Tippfehler oder so ;)

Danke schonmal,
dnk05
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Do 03.11.05 18:03 
Diese Procedure ist aber 10000%ig nicht Teil deiner Klasse und muss daher dein Formularobjekt 10000%ig erst referenzieren...

LabelZiel --> Form1.LabelZiel ...

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
dnk05 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 40


D3 Prof
BeitragVerfasst: Do 03.11.05 18:07 
Oh mist.
Das wars auch schon!

Vielen Dank ;)
und sry, weil ich bin eben anfänger... wie man sieht :)