Autor Beitrag
qwertzuiopü
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 63



BeitragVerfasst: Mo 13.03.06 22:17 
Hallo zusammen,
ich habe eine Countdown Prozedur in eines meiner Programme eingebaut, dies auch schon öffter, dioch jetzt bekomme ich auf einmal eine Fehlermeldung die ich vorher noch nicht hatte und ich kann mit ihr auch nichts anfangen.

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:
implementation

uses Unit2, Unit3;

{$R *.dfm}

var
     t: TTime;
const
  lauf: boolean = false;
  n = '00:00:00';

procedure TMein.Execute;
begin
  repeat
    if lauf then synchronize(doit);
  until false;
end;

procedure TMein.doit;
var rest: string;
begin
  with Form1 do begin
    rest := formatdatetime('hh:nn:ss', t - frac(time));
    if rest <> label70.caption then
      label70.caption := rest;
    if rest = n then begin
      lauf := false;
      ShowMessage('10 minuten bis zur nächsten Wache');
    end;
  end;
end;

procedure TForm1.null;
begin
  label1.caption := n;
end;


Button1:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
procedure TForm1.Button578Click(Sender: TObject);
var s: string;
begin
  if not lauf then begin
    s := '00:05:00';
    lauf := true;
    label70.caption := s;
    t := strtotime(s) + time + 0.00001;
  end else begin
    lauf := false;
    null;
  end;
end;



Form1 create:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
procedure TForm1.FormCreate(Sender: TObject);
begin
  null;
  button1.caption := 'Start';
  TMein.create(false);
end;


Ich hoffe ihr könnt mir helfen.


qwertzuiopü
Ironwulf
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 733
Erhaltene Danke: 2



BeitragVerfasst: Mo 13.03.06 22:22 
wasn da für nen fehler?
qwertzuiopü Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 63



BeitragVerfasst: Mo 13.03.06 22:46 
sorry vergessen zu nennen:

Linke seite kann nichts zugewisen werden


procedure TMein.doit:
ausblenden Delphi-Quelltext
1:
      lauf := false;					
Blackheart666
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2195

XP
D3Prof, D6Pers.
BeitragVerfasst: Mo 13.03.06 22:54 
Ist nicht von Dir ist von DBR, aber wenn du ihn schon öfters verwendet hast müsste dir der Fehler darin auch schon aufgefallen sein !
qwertzuiopü Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 63



BeitragVerfasst: Mo 13.03.06 23:00 
Ich habe denn Quelltext vor zwei mOntaten von einem Freund per E-Mail bekommen, der hat den woll im Netz gefunden, dachte ich könnte ihn einfach weiter verwenden. aber mir ist der Fehler wirklich nicht aufgefallen, der ist zum ersten mal aufgefgetaucht. Ich habe nicht so viel Delphi erfahrung. Die VAriabele ist doch richtig erstellt, oder?
Blackheart666
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2195

XP
D3Prof, D6Pers.
BeitragVerfasst: Mo 13.03.06 23:08 
ausblenden Delphi-Quelltext
1:
2:
3:
var
  Form1: TForm1;
  lauf:Boolean;
Marc.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1876
Erhaltene Danke: 129

Win 8.1, Xubuntu 15.10

BeitragVerfasst: Mo 13.03.06 23:09 
Zitat:
Die VAriabele ist doch richtig erstellt, oder?


Variable? Du hast lauf als Konstante deklariert und eine konstante ist nicht variabel, heißt folglich auch nicht Variabel, sondern Konstante! :lol:


edit: da war einer schneller :roll:
qwertzuiopü Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 63



BeitragVerfasst: Mo 13.03.06 23:17 
Ich könnte mich ohrfeigen, das ich da nicht selbst drauf gekommen bin.

--->Danke<---


qwertzuiopü