Autor Beitrag
Shaky
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 72

WinXP
D5, Delphi 2005 Prof.
BeitragVerfasst: So 17.04.05 21:24 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
procedure TForm1.Refresh;
begin
  Listbox1.Clear;
  Listbox1.Items.Add('..');
  try
    IdFTP1.List('',false);
    ListBox1.Items.AddStrings(IdFTP1.ListResult);
  except
  end;
end;


Was ist daran falsch?
Jedesmal wenn das Verzeichnis leer ist, dann gibt es ne Exception: 'No Files in Directory'
Ich dachte das fängt man so ab. Aber klappt nicht.

Wie kann ich das machen?

Und wo wir gerade dabei sind. Gibt es ne fertig Komponente für nen Directorylist und Filelist auf nem FTP?

Danke

Moderiert von user profile iconAXMD: Code- durch Delphi-Tags ersetzt.
AXMD
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 4006
Erhaltene Danke: 7

Windows 10 64 bit
C# (Visual Studio 2019 Express)
BeitragVerfasst: So 17.04.05 21:28 
user profile iconShaky hat folgendes geschrieben:
Ich dachte das fängt man so ab. Aber klappt nicht.


Ämmm... was fängst du hier ab - nur mal so nebenbei?

AXMD
Shaky Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 72

WinXP
D5, Delphi 2005 Prof.
BeitragVerfasst: Mo 18.04.05 07:19 
Die Exception. Steht doch im Titel :)

Die fängt man doch damit ab, oder?
Karlson
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 2088



BeitragVerfasst: Mo 18.04.05 11:29 
Ja, wobei ich deinen Code allerdings nicht nachvollziehen kann. Solange du das Programm aus der IDE raustartest verhindern allerdings deine Compilerinstellungen das abfangen.
wenn du die kompilierte Exe Datei ausführst wirst du keinen Fehler mehr bekommen.