Autor Beitrag
delphia1029
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 17



BeitragVerfasst: Mi 16.09.09 17:57 
bei meinem Programm, wird zuerst eine Datei kopiert und im nächsten schritt bearbeitet. dabei passiert es, dass die Datei noch gar nicht fertig kopiert ist und schon der nächste schritt ausgeführt wird. kann ich dafür eine art bremse einbauen? Sonst bekomme ich eine Fehlermeldung, dass Datie nicht existiert


Moderiert von user profile iconNarses: Topic aus Sonstiges (Delphi) verschoben am Mi 16.09.2009 um 23:16
FinnO
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1331
Erhaltene Danke: 123

Mac OSX, Arch
TypeScript (Webstorm), Kotlin, Clojure (IDEA), Golang (VSCode)
BeitragVerfasst: Mi 16.09.09 18:15 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
while not fileexists('deineDatei.dat') do
begin
  sleep(100);
end;
Xentar
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2077
Erhaltene Danke: 2

Win XP
Delphi 5 Ent., Delphi 2007 Prof
BeitragVerfasst: Mi 16.09.09 18:43 
Wie kopierst du die Datei denn?
Sollte die Prozedur nicht erst zurückkehren, wenn dies abgeschlossen ist?

_________________
PROGRAMMER: A device for converting coffee into software.
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Do 17.09.09 08:08 
Wenn du das mit CopyFile() machst, dann sollte der Programmfluss eigentlich erst weiterlaufen, wenn die Datei korrekt kopiert wurde.
Da solltest du natürlich auch den Rückgabewert der Funktion überprüfen!

_________________
In the beginning was the word.
And the word was content-type: text/plain.