How do you read TMemoryStream directly from a Memo.Lines.Text, basically from a TStringList?
The example I could find and currently use entails saving the TStringList to a file, and loading the MemoryStream from the file.
Can't it be done directly?
compStream := TMemoryStream.Create;
try
mmoTriedLFM.Lines.SaveToFile('atempFile');
compStream.LoadFromFile('atempFile');
compStream.Position := 0;
component := FActiveForm.FindComponent(GridSelectedComponentName);
try
ReadComponentFromTextStream(compStream, component, @OnFindClass, nil, nil);
except
on E : Exception do
ProcessLoadLFMException(E);
end;
finally
compStream.Free;
end;