Autor Beitrag
lblbw
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 122

Win XP, Win 7
Delphi7 Enterprise
BeitragVerfasst: Mo 14.04.08 13:17 
Hallo,

wie ich schon in der SB angedeutet habe, werde ich euch diese Woche wieder nerven. :D :rofl:

Folgendes Problem:
Ich starte den OpenDialog über den ganze normalen Befehl:
ausblenden Delphi-Quelltext
1:
2:
if OpenDialog1.Execute = true then
// ...


Wenn ich im Dialog auf Abbrechen klicke, bekomme ich immer die im Anhang angezeigte Fehlermeldung. Das Programm stürzt nicht weiter ab, nur eben diese dumme Fehlermeldung ist ein Ärgerniss.
Einloggen, um Attachments anzusehen!
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 480

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Mo 14.04.08 13:29 
Probiers mal mit

ausblenden Delphi-Quelltext
1:
2:
3:
4:
if OpenDialog1.Execute then
begin
//...
end;


Also ohne =true, dafür mit begin/end. Woran der Fehler liegt, kann man ohne weiteren Code nur raten.

_________________
We are, we were and will not be.
lblbw Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 122

Win XP, Win 7
Delphi7 Enterprise
BeitragVerfasst: Mo 14.04.08 13:38 
Hallo, hier ist der Original Code:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
  Playlist.Clear;
  if OpenDialog1.Execute then
  begin
    for i := 0 to OpenDialog1.Files.Count - 1 do
      Playlist.Add(FilesOpenDialog.Files[i]);
  end;
  Playlist.Play(-1);
  Slider1.MaxValue:=Playlist.PlayingFile.Dauer;
  if radio=true then
  begin
    BassPlayer1.Stop;
    radio:=false;
  end;
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 480

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Mo 14.04.08 13:55 
Du leerst die Playlist. Wenn der Opendialog abgebrochen wird, bleibt die Playlist leer. Dann spielst du etwas ab, und greifst auf das abspielende File zu. Dieses dürfte in diesem Fall aber nicht vorhanden/ungültig sein.

_________________
We are, we were and will not be.
lblbw Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 122

Win XP, Win 7
Delphi7 Enterprise
BeitragVerfasst: Mo 14.04.08 14:03 
Manchmal sieht man den Baum vorlauter Bäumen nicht. Danke!
Blackheart666
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2195

XP
D3Prof, D6Pers.
BeitragVerfasst: Mo 14.04.08 14:36 
Den Wald ! :wink:

_________________
Blackheart666
Der Irrsinn ist bei Einzelnen etwas Seltenes, - aber bei Gruppen, Parteien, Völkern, Zeiten die Regel. (Friedrich Nietzsche)
lblbw Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 122

Win XP, Win 7
Delphi7 Enterprise
BeitragVerfasst: Mo 14.04.08 14:59 
Das kommt davon, wenn man den Prof zuhören muss, nebenbei hier rein schreibt und dann noch per Hand schreibt!
jakobwenzel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1889
Erhaltene Danke: 1

XP home, ubuntu
BDS 2006 Prof
BeitragVerfasst: Mo 14.04.08 15:18 
Noch eine Anmerkung zu deinen Vergleichen auf true: www.michael-puff.de/...h_Wahrheitswerte.php

_________________
I thought what I'd do was, I'd pretend I was one of those deaf-mutes.
lblbw Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 122

Win XP, Win 7
Delphi7 Enterprise
BeitragVerfasst: Mo 14.04.08 15:21 
Sorry, aber ich mach das nun mal so. Ich komme besser damit klar, wenn ich da zustehen habe "= true"
Hidden
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 2242
Erhaltene Danke: 55

Win10
VS Code, Delphi 2010 Prof.
BeitragVerfasst: Mo 14.04.08 16:31 
Wenn du den Artikel liest, fällt dir auf , warum nicht...

_________________
Centaur spears can block many spells, but no one tries to block if they see that the spell is a certain shade of green. For this purpose it is useful to know some green stunning hexes. (HPMoR)