I have an object (TFoo = class, MyFoo) the has a string field (public FRICHEDIT) to store the contents of a TStringStream.DataString.
I have a TMS FNC TRichEditor where I can save the contents to a steam, in this case a MyStringStream: TStringStream. I then set FRICHEDIT (via prop) to the TStringStream.DataString;
I populate other MyFoo fields via properties and members, and set a MyStringList.Text to TJson.ObjectToJsonString(MyFoo), followed by a SaveToFile. Works great. Inspect the file with Notepad++, all looks as expected, including all public fields.
To restore from file, I use MyStringList.LoadFromFile, followed by TJSON.JsonToObject
When I try to do MyStringStream.WriteString(FRICHEDIT), I get an AV error. I think this is related to an encoding problem, but I cannot find it with debug.
The intention is to use the TRichEditor.LoadFromStream(MyStringStream) to restore the rte (rtf) contents).
I have also sent a support request to TMS to see if there is a better way to do this.
I can include a coding example or snippet is necessary. Thanks.