[Lazarus] how to TXMLPropStorage SaveToStream() LoadFromStream

Virgo Pärna virgo.parna at mail.ee
Thu Jul 3 12:50:01 CEST 2014


On Thu, 03 Jul 2014 13:26:46 +0300, FreeMan <freeman35 at delphiturkiye.com> wrote:
>
> I add my test project.
>
> 03-07-2014 11:34 tarihinde, Virgo Pärna yazdı:
>>      At which line that error occured?
> TmyCustomXMLPropStorage(XMP).XMLConfig.SaveToStream(st);//error is hear 
> XMLConfig is NIL !!!
>

    From LCL source TCustomXMLPropStorage.StorageNeeded Creates XMLConfig. And 
now I noticed, that TPropStorageXMLConfig indeed has stream methods. So - calling 
StorageNeeded before using XMLConfig should work (I have never used that component). 
And also remember to seek to beginning before reading from stream. 

-- 
Virgo Pärna 
virgo.parna at mail.ee





More information about the Lazarus mailing list