This forum is temporaily read-only. All existing discussions remain available for reference. For new questions, bug reports or support requests, please contact us at mail@lmdsupport.com.

Save Docking-XML in my own projectfile

edited April 2012 in LMD IDE-Tools
The XML-string can I get in this way from the Docking-Manager:

  s := TStringStream.Create;
  Dockmanager1.SaveToStream(s);
  Result := s.DataString;
  s.Free;

That works fine! I save it as a XML-string in my project-file.

But when I want to send a XML-string from my file to the Docking-Manager Delphi always give an exception.
Source:
  s := TStringStream.Create;
  s.WriteString(MyXMLstring);
  Dockmanager1.LoadFromStream(s);
  s.Free;
 
The exception EReadError comes here:
procedure TLMDXmlDocument.Load(aStream: TStream);
 ...
    aStream.ReadBuffer(aBinarySign[1], LMDBinXmlSignatureSize);
 ...
 
 What do I wrong?
 
 Greetings Jens

Comments

  • maybe

    aStream.Seek( 0,soFromBeginning )

    before LoadFromStream ?

    Regards


  •   s := TStringStream.Create;
      s.WriteString(MyXMLstring);
      s.Seek( 0,soFromBeginning )
      Dockmanager1.LoadFromStream(s);
      s.Free;

    Yes, it works, thanks....
  • ...Or s.Position := 0;
Sign In or Register to comment.