Autor Beitrag
Flamefire
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1207
Erhaltene Danke: 31

Win 10
Delphi 2009 Pro, C++ (Visual Studio)
BeitragVerfasst: Mi 04.06.08 11:23 
Wie kann ich bei der IdFTP-KOmpo verhindern, dass wärend des Uploads die komplette Anwendung ausgelastet ist?
Also das ganze formular reagiert nicht mehr.
Erweiterung dazu: Kann ich den aktuellen Fortschritt anzeigen lassen?

Habs schon mit onwork probiert. Aber das wird NIE aufgerufen (mit BP getestet)

EDIT: ich hab indy 9
indy 10 hat mir noch zu viele fehler
Calculon
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 676

Win XP Professional
Delphi 7 PE, Delphi 3 PRO
BeitragVerfasst: Mi 04.06.08 12:12 
Gegen das Einfrieren kannst du IdAntiFreeze (o.ä.) benutzen, wobei des Ding gelegentlich auch spinnt oder den Update-Vorgang in einen Thread auslagern. Wegen Fortschritt: Es gibt das Ereignis OnWork (o.ä.).

Gruß

Calculon
--
Flamefire Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1207
Erhaltene Danke: 31

Win 10
Delphi 2009 Pro, C++ (Visual Studio)
BeitragVerfasst: Mi 04.06.08 12:20 
onwork hab ich ja schon probiert: wird nicht aufgerufen
da hab ich ja auch ein application.processmessagesdrin

so hab jetzt mal ein
DoWork(wmWrite, AByteCount);
TIdAntiFreezeBase.DoProcess(False);
in writebuffer hinzugefügt...geht jetzt schön sauber
aber nach der übertragung hängt er ne gane weile hier:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
procedure TIdTCPConnection.GetInternalResponse;
var
  LLine: string;
  LResponse: TStringList;
  LTerm: string;
begin
  LResponse := TStringList.Create; try
    LLine := ReadLnWait; //hier

kann ich das umgehen? der macht das um zu wissen, ob die übertragung ok war

edit:
hasb weiter eingegrenzt:
ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
function TIdSocketHandle.Readable(AMSec: Integer = IdTimeoutDefault): boolean;

  function CheckIsReadable(AMSec: Integer): Boolean;
  var
    ReadList: TList;
  begin
    if not FHandleAllocated then begin
      raise EIdConnClosedGracefully.Create(RSConnectionClosedGracefully);
    end;

    ReadList := TList.Create; try
      ReadList.Add(Pointer(Handle));
      Result := GStack.WSSelect(ReadList, nilnil, AMSec) = 1;
      TIdAntiFreezeBase.DoProcess(Result = False);
    finally ReadList.Free; end;
  end;

begin
  if TIdAntiFreezeBase.ShouldUse then begin
    if AMSec = IdTimeoutInfinite then begin
      repeat
        Result := CheckIsReadable(GAntiFreeze.IdleTimeOut); //hier hängt er die ganze zeit
      until Result;
      Exit;
    end else if AMSec > GAntiFreeze.IdleTimeOut then begin
      Result := CheckIsReadable(AMSec - GAntiFreeze.IdleTimeOut);
      if Result then begin
        Exit;
      end else begin
        AMSec := GAntiFreeze.IdleTimeOut;
      end;
    end;
  end;
  Result := CheckIsReadable(AMSec);
end;
Flamefire Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1207
Erhaltene Danke: 31

Win 10
Delphi 2009 Pro, C++ (Visual Studio)
BeitragVerfasst: Fr 13.06.08 23:12 
das problem ist immer noch aktuell!
er hängt wärend er auf die bestätigung wartet, dass der uplaod ok war...
was kann ich machen?
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: Sa 14.06.08 00:51 
Lager die Übertragung in einen eigenen Thread aus.
Flamefire Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1207
Erhaltene Danke: 31

Win 10
Delphi 2009 Pro, C++ (Visual Studio)
BeitragVerfasst: Sa 14.06.08 13:06 
das würde nur verhindern das das programm blockiert...durch idantifreeze geht das auch
mein problem ist aber, dass der upload normal schnell geht und der dann teilweise 30sec an der einen stelle hängt um auf ne bestätigung zu warten
bei 10 dateien macht das schon keinen spaß mehr
Flamefire Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1207
Erhaltene Danke: 31

Win 10
Delphi 2009 Pro, C++ (Visual Studio)
BeitragVerfasst: Do 24.07.08 14:56 
ok
hab nochmal n bissl nachgeguckt: der upload geht zu schnell. so schnell kann der die datei nicht hochladen (zumindest im vergleich zu ws_ftp)
also muss der da noch iwas nachladen oder was auch immer...
hat denn keiner ne idee warum der dort ewig wartet? oder was der dort macht?