Autor Beitrag
ForzaFCH
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 80


D6 / D7 Personal
BeitragVerfasst: Do 29.04.04 14:26 
also ich will sagen wenn ein Feld leer ist das er es mit 0 auffült.
if edit.text='' then edit1.text:='0'; hier bringt er zwar keienn fehler, aber er füllt es nicht mit 0 auf, also macht gar nichts :(

_________________
HANSA ROSTOCK DU SOLLST STRAHLEN..... *sing* Für immer und ewig FC hansa Rostock!
Christian S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 20451
Erhaltene Danke: 2264

Win 10
C# (VS 2019)
BeitragVerfasst: Do 29.04.04 14:40 
Wo wird das denn gemacht?

_________________
Zwei Worte werden Dir im Leben viele Türen öffnen - "ziehen" und "drücken".
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19346
Erhaltene Danke: 1754

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Do 29.04.04 14:47 
Der Fehler ist, dass du abfragst, ob das feld edit leer ist, aber dann mit edit1 arbeitest:

Zitat:
ausblenden Delphi-Quelltext
1:
if edit.text='' then edit1.text:='0';					


Richtig (nehme ich an):
ausblenden Delphi-Quelltext
1:
if edit1.text='' then edit1.text:='0';					


Zuletzt bearbeitet von jaenicke am Do 29.04.04 14:48, insgesamt 1-mal bearbeitet
Tilo
ontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 1098
Erhaltene Danke: 13

Win7 geg. WInXP oder sogar Win98
Rad2007
BeitragVerfasst: Do 29.04.04 14:47 
@ForzaFCH
der Code müsste Richtigsein. Er muss in der OnChange-Routine für Edit1 stehen.
Christian S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 20451
Erhaltene Danke: 2264

Win 10
C# (VS 2019)
BeitragVerfasst: Do 29.04.04 14:56 
jaenicke hat folgendes geschrieben:
Der Fehler ist, dass du abfragst, ob das feld edit leer ist, aber dann mit edit1 arbeitest:

Zitat:
ausblenden Delphi-Quelltext
1:
if edit.text='' then edit1.text:='0';					


Richtig (nehme ich an):
ausblenden Delphi-Quelltext
1:
if edit1.text='' then edit1.text:='0';					
:autsch: So'ne kleine "1"! Habe selbst beim Vergleichen der Sourcecodes lange gebraucht, um das zu sehen.

_________________
Zwei Worte werden Dir im Leben viele Türen öffnen - "ziehen" und "drücken".
ForzaFCH Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 80


D6 / D7 Personal
BeitragVerfasst: Do 29.04.04 15:03 
also es funzt irgendwie. mir viel dann auf das ich es außerhalb des begin hatte ;)

_________________
HANSA ROSTOCK DU SOLLST STRAHLEN..... *sing* Für immer und ewig FC hansa Rostock!
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19346
Erhaltene Danke: 1754

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Do 29.04.04 15:06 
Außerhalb des begin???
Und das wurde kompiliert???
*kratz am kopf*
ForzaFCH Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 80


D6 / D7 Personal
BeitragVerfasst: Do 29.04.04 15:57 
jo... aber er hat halt gar nix gemacht :)

_________________
HANSA ROSTOCK DU SOLLST STRAHLEN..... *sing* Für immer und ewig FC hansa Rostock!