On Tue, 20 May 2008 16:34:50 +0800 (CST)
[EMAIL PROTECTED] wrote:
> On Tue, 20 May 2008 14:26:53 +0800 (CST) [EMAIL PROTECTED] wrote:
>
> > Dear All,
> >
> > procedure TspCompressedStoredSkin.DefineProperties(Filer: TFiler);
> > begin
> > inherited;
> > Filer.DefineBinaryProperty('CompressedData', ReadData, WriteData,
> > True); end;
> >
> > procedure TspCompressedStoredSkin.ReadData; begin
> > FCompressedStream.LoadFromStream(Reader);
> > end;
>
> >>What is FCompressedStream?
> >>ReadData is missing the parameter.
>
> FCompressedStream IS TMemoryStream.
Something like that:
procedure TspCompressedStoredSkin.ReadData(Reader: TStream);
begin
FCompressedStream.Position:=0;
FCompressedStream.LoadFromStream(Reader);
...
end;
?
This should work the same as Delphi.
> > On Delphi, this method returns rigth size(38750 byte) and it's work.
> > but on Lazarus returns wrong size(38764 byte).
> > Why? Is it a bug?
>From what kind of stream are you reading? .lfm, .xml? Under what
platform and which fpc version?
Can you post a more complete example?
Mattias
_______________________________________________
Lazarus mailing list
[email protected]
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus