Autor Beitrag
Bookworm
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 29

Win XP SP2
Delphi 2005 PE
BeitragVerfasst: Mo 23.07.07 15:16 
Hallo zusammen

ich stoße grade auf einen Fehler/eine Problematik, bei der ich mich nicht zu helfen weiß. Ich habe ein Image auf dem Formular erstellt und will auf dieses aus einer eigenen Prozedur darauf zugreifen, besser gesagt, darauf herummalen.

Die Prozedur sieht so aus:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
procedure paint;
var i:integer;
begin
  for i:=1 to 10
    do begin
      Image1.Canvas.MoveTo((i*10), data[i]);
      Image1.Canvas.LineTo(((i+1)*10), data[i+1]);
    end;
end;


Die Prozedur habe ich vorher im Private-Teil angegeben:
ausblenden Delphi-Quelltext
1:
2:
private      
procedure paint; //Werte auf die Leinwand zeichnen


Jetzt meldet er mir aber
Zitat:
E2003 Undefinierter Bezeichner: 'Image1'

und
Zitat:
E2066 Operator oder Semikolon fehlt


Ich weiß nicht was ich falsch mache, es kann ja nicht so schwer sein eine simple Zeichenfunktion auszulagern :?

Gruß
Bookworm
Wonko
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 69



BeitragVerfasst: Mo 23.07.07 15:22 
ich glaube, es liegt daran, dass Deine Procedure Deine Form nicht kennt? Geht es, wenn Du Form1.Image1.Canvas schreibst oder halt procedure Form1.paint ??
Bookworm Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 29

Win XP SP2
Delphi 2005 PE
BeitragVerfasst: Mo 23.07.07 15:24 
Nein, hatte ich auch schon ausprobiert. Dann hagelt es nur noch mehr Fehlermeldungen.
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10183
Erhaltene Danke: 1256

W10ent
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mo 23.07.07 15:27 
Moin!

Die Prozedur ist ja gar kein Member der Formularklasse: ;)
ausblenden Delphi-Quelltext
1:
2:
3:
procedure TForm1.paint;
var i:integer;
//...

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
Bookworm Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 29

Win XP SP2
Delphi 2005 PE
BeitragVerfasst: Mo 23.07.07 15:33 
Thx das wars :P