[Lazarus] how to TXMLPropStorage SaveToStream() LoadFromStream

FreeMan freeman35 at delphiturkiye.com
Wed Jul 2 18:19:48 CEST 2014


Thanks your suggestion, I need similar TXMLPropStorage.SaveToStream() 
and TXMLPropStorage.LoadFromStream(). Iwanna save and load xml doc to 
Tstream.

this is in lfm:
object xmp: TXMLPropStorage
StoredValues = <
item
Name = '1111'
Value = '11111'
KeyString = '111'
end
item
Name = '22'
Value = '222'
KeyString = '2'
end>
left = 24
top = 16
end


procedure TForm1.Button1Click(Sender: TObject);
var st : TMemoryStream;
begin
try
st := TMemoryStream.Create;
TmyCustomXMLPropStorage(XMP).XMLConfig.SaveToStream(st);
memo1.Lines.LoadFromStream(st);
//TmyCustomXMLPropStorage(XMP).XMLConfig.LoadFromStream(st);
finally
st.Free;
end;
end;


and result :
Project project1 raised exception class 'External: SIGSEGV'.




02-07-2014 16:30 tarihinde, Virgo Pärna yazdı:
> On Wed, 02 Jul 2014 15:56:57 +0300, FreeMan <freeman35 at delphiturkiye.com> wrote:
>> without savefile to disk
>>
>
>      TMemoryStream
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20140702/41a76027/attachment-0003.html>


More information about the Lazarus mailing list