Autor Beitrag
Leuchtturm
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1087

Win Vista, Knoppix, Ubuntu
Delphi 7 Pe, Turbo Delphi, C#(VS 2005 Express), (X)HTML + CSS, bald Assembler
BeitragVerfasst: So 05.11.06 15:51 
Hi,
ich habe ein Problem(sonst wäre ich jetzt nicht hier :wink: ):
Wenn ich einen OpenDialog abbreche dann bekomme ich eine Zugriffsverletzung.
Code:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
 try
  JVPlaylist1.Items.AddStrings(opendialog1.Files);
 except
   ShowMessage('Fehler beim Öffnen der Datei!')
 end;

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

Lisgt das am OpenDialog oder an meiner Programmierung??
Leuchtturm

_________________
Ich bin dafür verantwortlich was ich sage - nicht dafür was du verstehst.
Lannes
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2352
Erhaltene Danke: 4

Win XP, 95, 3.11, IE6
D3 Prof, D4 Standard, D2005 PE, TurboDelphi, Lazarus, D2010
BeitragVerfasst: Mo 06.11.06 14:00 
Hallo,

eine Zugriffsverletzung durch den Opendialog ist mir nicht bekannt.

Setz doch mal einen Haltepunkt auf Zeile 2.
Funktioniert der Code bis zu dieser Zeile?

_________________
MfG Lannes
(Nichts ist nicht Nichts) and ('' <> nil ) and (Pointer('') = nil ) and (@('') <> nil )
azubi_20
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 593

WinXP SP2, Ubuntu 8.4
D7 Enterp., D2005 Prof., Java (Eclipse 3.4.0)
BeitragVerfasst: Mo 06.11.06 14:05 
gib mal den ganzen code der öffnen-prozedur....
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mo 06.11.06 14:14 
Was ist das für ein einsames Open? Und warum benutzt du einen OpenDialog, wenn du dessen Rückgabe, den Dateinamen, gar nicht benutzt?
Lannes
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2352
Erhaltene Danke: 4

Win XP, 95, 3.11, IE6
D3 Prof, D4 Standard, D2005 PE, TurboDelphi, Lazarus, D2010
BeitragVerfasst: Mo 06.11.06 14:40 
Hallo,
user profile iconLuckie hat folgendes geschrieben:
Was ist das für ein einsames Open? Und warum benutzt du einen OpenDialog, wenn du dessen Rückgabe, den Dateinamen, gar nicht benutzt?
ist doch kein Problem in Open Filename bzw. Files auszuwerten, sie bleiben doch erhalten. :gruebel:

_________________
MfG Lannes
(Nichts ist nicht Nichts) and ('' <> nil ) and (Pointer('') = nil ) and (@('') <> nil )
Leuchtturm Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1087

Win Vista, Knoppix, Ubuntu
Delphi 7 Pe, Turbo Delphi, C#(VS 2005 Express), (X)HTML + CSS, bald Assembler
BeitragVerfasst: Mo 06.11.06 17:38 
Danke erstmal


user profile iconLannes hat folgendes geschrieben:
Hallo,

eine Zugriffsverletzung durch den Opendialog ist mir nicht bekannt.

Setz doch mal einen Haltepunkt auf Zeile 2.
Funktioniert der Code bis zu dieser Zeile?


Ja der Code funktioniert bis zu der Zeile




user profile iconLuckie hat folgendes geschrieben:
Was ist das für ein einsames Open? Und warum benutzt du einen OpenDialog, wenn du dessen Rückgabe, den Dateinamen, gar nicht benutzt?

1.Ich brauche die Dateinamen
2.Das einsamme Open ist eine Prozedur die ich dort öffne, hääte ich vllt erwähnen sollen :wink:

Und jetzt habe ich es hinbekommen:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
 
 try
  if OpenDialog1.Excute then JVPlaylist1.Items.AddStrings(opendialog1.Files);
 except
   ShowMessage('Fehler beim Öffnen der Datei!')
 end;


ausblenden Delphi-Quelltext
1:
Open;					

_________________
Ich bin dafür verantwortlich was ich sage - nicht dafür was du verstehst.