trichview.com

trichview.support




copy from one RVE to another RVE ?


Return to index


Author

Message

Stef Mientki

Posted: 11/19/2003 3:53:08


Sergey this answer is from yourself,

but it doesn't work completly (in my case)


===========start quote

It's better to copy via memory stream:


var Stream: TMemoryStream;


Stream := TMemoryStream.Create;

rvsource.SaveRVFToStream(Stream, False);

Stream.Position := 0;

rvdest.LoadRVFFromStream(Stream);

Stream.Free;

rvdest.FormatTail;

===========end quote


when I do this a first time, everything goes well,

but the second time (with other contents of the source RVE), either

   the first line is vanished

or

   I get a "list index out of bound"

This is my code:



       RVE2.clear;

       RVE2.options:=RVE1.Options;

       Stream := TMemoryStream.Create;

       RVE1.SaveRVFToStream(Stream, False);

       Stream.Position := 0;

       RVE2.LoadRVFFromStream(Stream);

       Stream.Free;

       //RVE2.Format;     //this works perfect

       RVE2.FormatTail;  //listindex out of bound

       RVE2.scrollto(0);


When I change "FormatTail" to "Format" everything goes perfect ;-)


cheers,

Stef Mientki






Powered by ABC Amber Outlook Express Converter