Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Nov : IdFTP : OnWorkBegin/OnWork Générate Excepti on
| Subject: | IdFTP : OnWorkBegin/OnWork Générate Excepti on |
| Posted by: | "Malatar" (in..@full-technologies.com) |
| Date: | Wed, 8 Nov 2006 15:05:27 |
Hello,
I try to show a progress bar for the file that i upload
But it generate an exception
Access violation at address 078D0577. writing adress 00000000
Sample code :
jvgpFile is a JVCL Componant TJvGradientProgressBar
procedure TfrmFTP.IdFTP1WorkBegin(ASender: TObject;
AWorkMode: TWorkMode; AWorkCountMax: Int64);
begin
if AWorkMode = wmWrite then
begin
jvgpFile.Max := AWorkCountMax; // <- Exception here
Application.ProcessMessages;
end;
end;
procedure TfrmFTP.IdFTP1Work(ASender: TObject; AWorkMode: TWorkMode;
AWorkCount: Int64);
begin
if AWorkMode = wmWrite then
begin
jvgpFile.Position := AWorkCount;
Application.ProcessMessages;
end;
end;
Thanks.