Autor Beitrag
Xearox
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 260
Erhaltene Danke: 3



BeitragVerfasst: Mo 11.01.10 07:40 
so folgendes...

Ich habe eine Unit zum Downloaden angelegt.
Soweit ja alles okay, Dateien werden downgeloadet, alles kein Thema...
Aber...

Ich habe 3 Panels(für 3 Dateien) angelegt, nun ist das Problem, das die Panels nicht Aktuallisiert werden.
Der Code dazu lautet(hab da was bei google gefunden, geht aber irgendwie nicht):

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
    
IdFTP1.Get('EEExtractor.exe', (ExtractFilePath(ParamStr(0)) + 'EEExtractor.exe'), true);
Panel1.Color:=clgreen;
Panel1.Caption:=('Fertig');
Form2.update;
IdFTP1.Get('Launcher.exe', (ExtractFilePath(ParamStr(0)) + 'Launcher.exe'), true);
Panel2.Color:=clgreen;
Panel2.Caption:=('Fertig');
Form2.update;
IdFTP1.Get('Updater.exe', (ExtractFilePath(ParamStr(0)) + 'Updater.exe'), true);
Panel3.Color:=clgreen;
Panel3.Caption:=('Fertig');
Form2.update;



Hat hier jemand eine Lösung?


Moderiert von user profile iconNarses: Topic aus Sonstiges (Delphi) verschoben am Mo 11.01.2010 um 10:26
platzwart
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1054
Erhaltene Danke: 78

Win 7, Ubuntu 9.10
Delphi 2007 Pro, C++, Qt
BeitragVerfasst: Mo 11.01.10 10:55 
Versuchs mal mit Form2.Refresh; Ansonsten: ist es wirklich die Form2 ?

_________________
Wissenschaft schafft Wissenschaft, denn Wissenschaft ist Wissenschaft, die mit Wissen und Schaffen Wissen schafft. (myself)
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mo 11.01.10 11:27 
Moin!

Das Verhalten ist völlig normal, da die Indy-Kompos mit blocking-socket-calls arbeiten. Du musst die Downloads in einen Thread auslagern (gibt zwar noch diese IdAntifreeze Frickelei, aber das ist Müll). :idea: ;)

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
Bergmann89
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1742
Erhaltene Danke: 72

Win7 x64, Ubuntu 11.10
Delphi 7 Personal, Lazarus/FPC 2.2.4, C, C++, C# (Visual Studio 2010), PHP, Java (Netbeans, Eclipse)
BeitragVerfasst: Mo 11.01.10 13:46 
Hey,

ich hatte das gleich Problem mit TIdHTTP und hab mir dazu DAS geschrieben. Das sollte dir weiter helfen...

MfG Bergmann.

_________________
Ich weiß nicht viel, lern aber dafür umso schneller^^
Xearox Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 260
Erhaltene Danke: 3



BeitragVerfasst: Di 12.01.10 05:53 
user profile iconXearox hat folgendes geschrieben Zum zitierten Posting springen:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
    
IdFTP1.Get('EEExtractor.exe', (ExtractFilePath(ParamStr(0)) + 'EEExtractor.exe'), true);
Panel1.Color:=clgreen;
Panel1.Caption:=('Fertig');
Form2.update;
IdFTP1.Get('Launcher.exe', (ExtractFilePath(ParamStr(0)) + 'Launcher.exe'), true);
Panel2.Color:=clgreen;
Panel2.Caption:=('Fertig');
Form2.update;
IdFTP1.Get('Updater.exe', (ExtractFilePath(ParamStr(0)) + 'Updater.exe'), true);
Panel3.Color:=clgreen;
Panel3.Caption:=('Fertig');
Form2.update;



so, die lösung war eine einfache Sache, einfach Panel1.update, panel2.update, und Panel3.Update ändern...
so einfach...
Hab 2 Tage jetzt dran gesessen, und die lösung war so einfach :(
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Di 12.01.10 11:28 
Moin!

user profile iconXearox hat folgendes geschrieben Zum zitierten Posting springen:
so, die lösung war eine einfache Sache, einfach Panel1.update, panel2.update, und Panel3.Update ändern...
so einfach...
Hab 2 Tage jetzt dran gesessen, und die lösung war so einfach :(
Nein, das ist keine "Lösung", bestenfalls ein Workaround, und zwar ein schlechter. Versuch doch mal während des Downloads das Fenster zu verschieben... :roll:

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
Bergmann89
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1742
Erhaltene Danke: 72

Win7 x64, Ubuntu 11.10
Delphi 7 Personal, Lazarus/FPC 2.2.4, C, C++, C# (Visual Studio 2010), PHP, Java (Netbeans, Eclipse)
BeitragVerfasst: Di 12.01.10 17:21 
Hey,

da geb ich Narses recht, die einzige sinnvolle Lösung ist hier n Thread. Man muss sich kurz rein fitzen aber am ende is es eigentlich ganz easy. Ich habs auch erst mit haufen Updates und ProgressMessages probiert aber es hat nie so richtig funktioniert!

MfG Bergmann

_________________
Ich weiß nicht viel, lern aber dafür umso schneller^^
Xearox Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 260
Erhaltene Danke: 3



BeitragVerfasst: Di 12.01.10 18:30 
ich kann, während ich auf den Download Button klicke, nichts machen, sobald ich in das fenster rein Klicke, steht oben, keine Rückmeldung...
Also es geht garnichts...und dann kommt das Fenster von Windows, Auf Prgramm warten oder Programm schließen...
elundril
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3747
Erhaltene Danke: 123

Windows Vista, Ubuntu
Delphi 7 PE "Codename: Aurora", Eclipse Ganymede
BeitragVerfasst: Di 12.01.10 18:38 
genau deswegen sollst du es auch in einen Thread packen ;)

lg elundril

_________________
This Signature-Space is intentionally left blank.
Bei Beschwerden, bitte den Beschwerdebutton (gekennzeichnet mit PN) verwenden.
Xearox Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 260
Erhaltene Danke: 3



BeitragVerfasst: Di 12.01.10 19:26 
und wie mache ich das?
Bergmann89
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1742
Erhaltene Danke: 72

Win7 x64, Ubuntu 11.10
Delphi 7 Personal, Lazarus/FPC 2.2.4, C, C++, C# (Visual Studio 2010), PHP, Java (Netbeans, Eclipse)
BeitragVerfasst: Di 12.01.10 19:53 
user profile iconBergmann89 hat folgendes geschrieben Zum zitierten Posting springen:
Hey,

ich hatte das gleich Problem mit TIdHTTP und hab mir dazu DAS geschrieben. Das sollte dir weiter helfen...

MfG Bergmann.

_________________
Ich weiß nicht viel, lern aber dafür umso schneller^^