Autor Beitrag
Newcomer91
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 22



BeitragVerfasst: Do 11.03.10 11:06 
Ich hab bei meinem Programmm welches Items aus einer Listbox in eine seperate ini datei hinzufügen soll, ein neues Programm.
Ich habe noch leichte schwächen im programmieren, das vorweg :P

Im Moment habe ich ein Problem bei dieser Situation: ich trage über ein edit Feld die Einträge ein, diese werden dann in die listbox übernommen, aber AUCH wenn nichts im edit feld steht. meine Lösung funktioniert allerdings möchte ich wenn nichts im edit feld steht und jemand nen Beitrag hinzufügen möchte, das diese Wortmeldung erscheint "Eintrag erforderlich."

Hier der quelltext:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
begin
  if (edtEingabe.text <> '')  and (DirectoryExists(edtEingabe.text)) then
  begin
    lbxListe.Items.Add(edtEingabe.text);

  end
  else begin
        ShowMessage:=('Eingabe erforderlich.');

      end;
end;

Was habe ich falsch gemacht?

Danke im Vorraus

New

Moderiert von user profile iconNarses: Delphi-Tags hinzugefügt
Moderiert von user profile iconNarses: Topic aus Sonstiges (Delphi) verschoben am Do 11.03.2010 um 11:11
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Do 11.03.10 11:13 
Moin und :welcome: im Forum!

user profile iconNewcomer91 hat folgendes geschrieben Zum zitierten Posting springen:
meine Lösung funktioniert
Das glaube ich kaum, deinen Code wird der Compiler nicht akzeptieren:
user profile iconNewcomer91 hat folgendes geschrieben Zum zitierten Posting springen:
ausblenden Delphi-Quelltext
1:
2:
  else begin
        ShowMessage:=('Eingabe erforderlich.');
Mach mal das ":=" da weg, das ist ein Funktionsaufruf, keine Zuweisung. :idea: ;)

cu
Narses

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



BeitragVerfasst: Do 11.03.10 11:16 
wie blöd.....xDD

Danke, jetzt funktioniert es ;)

thx für die schnelle antwort :)

liebe grüße

New