TXMLConfig should be more flexible in terms of saving/loading of configs
Original Reporter info from Mantis: glotzer
-
Reporter name: Andreas
Original Reporter info from Mantis: glotzer
- Reporter name: Andreas
Description:
TXMLConfig in the unit "xmlconf" can only save to its property "Filename", it is not posible to save, for example, to a stream. This patch fixes this, it adds
procedure SaveToStream(AStream: TStream);
procedure LoadFromStream(AStream: TStream);
procedure SaveToFile(AFilename: String);
procedure LoadFromFile(AFilename: String);
and marks the property "Filename", "StartEmpty" and the procedure "Flush" as deprecated.
Unit test included.
I would prefere to remove those, but that would break backward compatibility so I let it be for now. If you think it is ok to break that, I can post another patch with those removed.
Mantis conversion info:
- Mantis ID: 26003
- OS: any
- OS Build: any
- Build: any
- Platform: any
- Version: 2.6.3
- Fixed in version: 3.0.0
- Fixed in revision: 30323 (#273b9454)
- Target version: 3.0.0