Autor Beitrag
TomPIII866
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 27



BeitragVerfasst: Mi 14.05.08 17:38 
Hallo,

habe ein kleines Problem.
Und zwar habe ich eine Prozedur erstellt, in der auf eine public-Variable zugegriffen werden soll.
Bei allen anderen Prozeduren klappt dies, nur bei dieser einen Prozedur nicht.

ausblenden Delphi-Quelltext
1:
2:
3:
4:
public
    { Public-Deklarationen }
    historyzeile : Integer;
    history : array of array[0..2] of String;


ausblenden Delphi-Quelltext
1:
2:
3:
4:
var
  frm_haupt: Tfrm_haupt;
  procedure darstwerte_auslesen;
  procedure lb_history_update;


ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
//PROCEDURE HISTORY-LISTBOX UPDATEN
procedure lb_history_update;
var j : Integer;
begin
//Listbox neu schreiben
  for j := 0 to historyzeile do   //ZEILE 455
    listbox_history.Items.Add(history[0, j] + ' nach: ' + history[1, j] + '; ' + history[2, j]);   //ZEILE 456
end;


Er gibt mir folgende Fehler aus:
Zeile 455: Undefinierter Bezeichner: "historyzeile"
Zeile 456: Undefinierter Bezeichner: "listbox_history"
Zeile 456: Operator oder Semikolon fehlt
Zeile 456: Unkompatible Typen: String und Integer

Was kann dafür die Ursache sein? Suche seit 2 Tagen und bin ratlos... :(

Moderiert von user profile iconChristian S.: Code- durch Delphi-Tags ersetzt
Moderiert von user profile iconChristian S.: Topic aus Sonstiges (Delphi) verschoben am Mi 14.05.2008 um 19:12
Marc.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1876
Erhaltene Danke: 129

Win 8.1, Xubuntu 15.10

BeitragVerfasst: Mi 14.05.08 17:47 
Ist die Verknüpfung der Prozedur mit der Klasse beim kopieren abhanden gekommen? ;)
Stefan-W
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 475

Win 7 SP1
D2005 PE
BeitragVerfasst: Mi 14.05.08 17:48 
Hi, ich würde spontan mal versuchen die Prozedur als eine vom Formular zu deklarieren und sie dann auch passend aufrufen
in deinem Fall dann:
ausblenden Delphi-Quelltext
1:
procedure frm_haupt.lb_history_update;					

ansonsten fällt mir da so weiter kein Fehler auf wo ich ansetzen könnte
TomPIII866 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 27



BeitragVerfasst: Mi 14.05.08 18:03 
Ach na klar.
Ist ja fast schon peinlich. :D

Muss natürlich in die Prozedur erstmal
ausblenden Quelltext
1:
with frm_haupt do					


setzen.

Danke für eure Tipps! :)
Man wird wirklich blind, wenn man längere Zeit programmiert.... :D