[Lazarus] Why was XML format chosen for storing settings in Lazarus IDE?

Henry Vermaak henry.vermaak at gmail.com
Fri Jun 18 13:01:27 CEST 2010


On 18 June 2010 11:52, Graeme Geldenhuys <graemeg.lists at gmail.com> wrote:
> On 18/06/2010, Henry Vermaak  wrote:
>> often.  Why are you even complaining about this?  Another storm in a
>> teacup?
>
> At this point, mostly out of curiosity.  :)
>
> On the other hand, there is no clear documentation about this for
> developers that would like to extend Lazarus IDE. For example, I wrote
> a few IDE add-ons over the years, and in all cases I simply followed
> the crowd blindly (due to lack of docs) and created yet more .xml
> files (one for each extension).  My preference would have been INI
> files because they are easier to use, and the settings stored was very
> simple.
>
> My last add-on was semi-rejected (or simply hanging in limo) mostly
> because I created yet another xml file (but this time for good reasons
> - a design/shared usage choice), and because I didn't use one of the
> many ways (apparently some are preferred above others) in Lazarus IDE
> code to read/write from such xml files.
>
> So if there was some logical reason for using xml, and a clear-cut
> reason why it was chosen and what exact method must be used to
> read/write them, then I would like to document that somewhere in the
> wiki for other Lazarus add-on developers.

Fair enough.  You've got a couple of viewpoints or reasons for xml now
(not that it really matters, since they're using it now anyway and are
unlikely to change).  So all we need for the docs is which way is
preferable to do xml read/write.

Does lazarus have a nice xml options class that add-ons can query to
retrieve their settings, or does every add-on have to do this
themselves?  I can see that there's a lot of benefit in abstracting
this out.




More information about the Lazarus mailing list