[Lazarus] LNet + fcl-web 2.3.1 fastcgi.pp
Aleš Katona
almindor at gmail.com
Sat Jul 11 10:06:18 CEST 2009
Hi all!
i wanted to compress a file using TCompressionStream, with a progressbar to
show the progress.
i wrote the code but they got Compilation Error:
var
fs,ms:TMemoryStream;
cs:TCompressionStream;
size:int64;
begin
fs:=TMemoryStream.Create;
fs.LoadFromFile(SourceFile.Text);
size:=fs.Size;
ms:=TMemoryStream.Create;
ms.Write(size,sizeof(size));
cs:=TCompressionStream.create(clMax,ms);
pb.Max:=Integer(size div 1024);
cs.onProgress:=CsOnProgress;
fs.SaveToStream(cs);
cs.Free;
ms.SaveToFile(DestFile.Text);
ms.Free;
fs.Free;
end;
the Error Messages are:
UCryptForm.pas(105,6) Error: identifier idents no member "onProgress"
UCryptForm.pas(105,30) Error: Wrong number of parameters specified for call
to "CsOnprogress"
UCryptForm.pas(63,22) Hint: Found declaration:
TCryptForm.CsOnprogress(TObject);
UCryptForm.pas(198) Fatal: There were 2 errors compiling module, stopping
i searched on the web, and found this page:
http://community.freepascal.org:10000/docs-html/fcl/zstream/tcompressionstream.onprogress.html
in this page, the OnProgress property was declared as "public", and on my
machine, the property is declared as "protected".
Can anybody tell me why?
Thanks in advance.
--
Regards,
Yan Chengyuan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20090710/c49f0b10/attachment-0004.html>
More information about the Lazarus
mailing list