Show quoted text 18 lines
On Tue, 20 May 2008 14:26:53 +0800 (CST) 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.
Show quoted text 5 lines
> 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