Autor Beitrag
tha_blaze Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 29

xp
D7
BeitragVerfasst: Do 13.01.05 12:13 
den breakpoint hab ich gesetzt und das prog gestartet. aber da passiert nichts ich hab auch f7 gedrückt kriegt man mit wenn der debugger anhält???
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Do 13.01.05 12:16 
Ganz blöde Frage: Ist denn Timer.Enabled auf True gesetzt???
Tino
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Veteran
Beiträge: 9839
Erhaltene Danke: 45

Windows 8.1
Delphi XE4
BeitragVerfasst: Do 13.01.05 12:18 
jasocul hat folgendes geschrieben:
Ganz blöde Frage: Ist denn Timer.Enabled auf True gesetzt???

Ich denke schon:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
procedure TForm1.FormCreate(Sender: TObject);
begin
 timer1.Enabled:=true;
 zaehler:=1;
 ini := TIniFile.Create('deine.ini');
end;
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Do 13.01.05 12:21 
So ist das, wenn man nicht nochmal zurück blättert.
Dann muss er aber bis zum Breakpoint kommen. Das ist aber laut seiner Aussage nicht der Fall. :gruebel:
tha_blaze Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 29

xp
D7
BeitragVerfasst: Do 13.01.05 12:45 
merke ich denn wenn er bis zum breakpoint kommt (passiert dann etwas)???

so jetzt kommt nochma der komplette quelltext:
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:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, FileCtrl, inifiles, ExtCtrls;

type
  TForm1 = class(TForm)
    LBFiles: TListBox;
    Button1: TButton;
    Button2: TButton;
    Timer1: TTimer;


  procedure Timer1Timer(Sender: TObject);
  procedure Button1Click(Sender: TObject);
  procedure FormCreate(Sender: TObject);
  procedure FormClose(Sender: TObject; var Action: TCloseAction);

  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var
  Form1: TForm1;
  FFileMan: TButton;
  LBFiles: TListBox;
  SR: TSearchRec;
  zaehler:Integer;
  ls: TStringList;

  i: integer;
  txt: TStrings;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
  close;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
 timer1.Enabled:=true;
 zaehler:=1;
 ini := TIniFile.Create('deine.ini');
end;

procedure TForm1.Timer1Timer(Sender: TObject);
ini: TIniFile;
begin
  if zaehler=5 then
  begin
   close;
  end
  else
  begin
    zaehler:= zaehler+1;
    ListFileDir('c:\medlinq\easy\*.*', LBFiles.Items);


  end;
end;
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
 ini.free;
end;

end.


das muss doch *nur* funktionieren... :cry:
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Do 13.01.05 13:06 
Klar merkst du was. Wenn du das Programm gestartet hast, läuft es solange, bis die Stelle mit dem Breakpoint erreicht wird. Dann geht die IDE auf und er Cursor sollte an der Stelle mit dem Breakpoint stehen, wenn dieser gültig ist. Die Zeile mit dem Breakpoint sollte rot markiert sein. Ist das nicht der Fall, ist der BP ungültig. Das passiert, wenn der Code an der Stelle aufgrund der Programmlogik rausoptimiert wurde.
tha_blaze Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 29

xp
D7
BeitragVerfasst: Do 13.01.05 13:13 
ok die zeile mit dem breakpoint ist rot makiert...wenn ich das prog starte dann wird die zeile dunkel grün und der breakpoint hat ein gelbes kreuz in der mitte. :?:
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Do 13.01.05 13:17 
Dein Code ist raus-optimiert worden. Dein Breakpoint wird nie erreicht. Warum kann ich dir so aber nicht sagen.
Sind denn in der Timer-Routine links blaue Punkte nach dem Compilieren?
Falls nicht, wird die ganze Timer-Rountine nicht aufgerufen. Falls doch, setze den Breakpoint auf eine dieser Stellen.
Tino
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Veteran
Beiträge: 9839
Erhaltene Danke: 45

Windows 8.1
Delphi XE4
BeitragVerfasst: Do 13.01.05 13:21 
jasocul hat folgendes geschrieben:
Sind denn in der Timer-Routine links blaue Punkte nach dem Compilieren?
Falls nicht, wird die ganze Timer-Rountine nicht aufgerufen.

Dann, tha_blaze, überprüfe ob im Eigenschaftsinspektor unter Ereignisse im OnTimer-Event auch die Timer1Timer eingetragen ist.
tha_blaze Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 29

xp
D7
BeitragVerfasst: Do 13.01.05 13:29 
während des compilierens sind blaue punkte da aber danach nicht mehr der erste punkt in der timer routine ist
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
procedure TForm1.Timer1Timer(Sender: TObject);
ini: TIniFile;
begin
  if zaehler=5 then
  begin
   close;
  end
  else
  begin
    zaehler:= zaehler+1;
    ListFileDir('c:\medlinq\easy\*.*', LBFiles.Items);
  end;
end;

in zeile 7 neben "end"
da habe ich einen break point gesetzt aber da passiert nichts und länger als eine minute wird das doch bestimmt nicht brauchen bis zum break point... :?!?:

_________________
stehen ein einbeiniger und ein blinder auf der brücke sagt der einbeinige zum blinden "ich trete dir gleich in hintern", darauf der blinde "das will ich sehen"!
tha_blaze Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 29

xp
D7
BeitragVerfasst: Do 13.01.05 13:31 
@ tino
ja Timer1Timer ist eingestellt...
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Do 13.01.05 13:48 
Damit wäre zumindest geklärt, dass der gesamte Timer-Code nicht genutzt wird. Das Timer-Ereignis findet nicht statt.
Die Ursache kann ich anhand des Sources nicht feststellen, zumal das im Ereignis im Objektinspektor ja eingetragen ist.
Demnach ist theoretisch alles korrekt.
Wird Vielleicht der Timer irgendwo auf False gesetzt?
tha_blaze Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 29

xp
D7
BeitragVerfasst: Do 13.01.05 13:55 
nein der timer im objekt manager is auf enable:true
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
procedure TForm1.FormCreate(Sender: TObject);
begin
 timer1.Enabled:=true;
 zaehler:=1;
 ini := TIniFile.Create('deine.ini');
end;

mehr steht nich über timer=true...
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Do 13.01.05 13:58 
Wenn du die Möglichkeit hast, stelle den Source mal als Download zur Verfügung.
Ich weiß zumindest so nicht mehr, woran das liegen kann.
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Do 13.01.05 14:31 
Folgende Stelle musste ich erstmal ändern:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
procedure ListFileDir(Path: string; FileList: TStrings);
begin // Das fehlte
end;  // Das hier auch
// Den Rest hast du selbst als Kommentar gesetzt
//finally

    //end;
    //
    //for i := 0 to LBFiles.Items.Count - 1 do

    //finally

    //end;
  //end;

Ohne mein begin .. end, konnt ich nichtmal compilieren.
Danach ist das Programm aber in die Timer-Routine reingesprungen. Allerdings gibt es da noch andere Fehler, die du dann aber noch bemerken wirst :wink: