[Gambas-user] gb.settings comments deleted

Benoît Minisini gambas at ...1...
Fri Dec 5 15:36:25 CET 2014


Le 05/12/2014 15:18, Tobias Boege a écrit :
> On Fri, 05 Dec 2014, Beno?t Minisini wrote:
>> Le 05/12/2014 12:07, Lewis Balentine a ?crit :
>>> When settings are written back to the ".conf" file all comments/remarks
>>> are stripped from the file.
>>> Should not the documentation include a warning to this effect?
>>
>> Yes.
>>
>>> Better yet would be to keep those comments/remarks intact.
>>
>> It's not really possible.
>>
>
> I didn't even know that comments were allowed. The wiki states it, yes, but
> the class interface doesn't offer it.
>
> How about a Settings.Comments As Collection property which can associate to
> a (valid) key in the Settings a few lines to put before that item in the
> settings file? This can be parsed correctly and later written to the file in
> order again. One may even imagine that the empty key can receive a comment
> which is put at the beginning of the comment file.
>
> Regards,
> Tobi
>

Pfff. I would say that if you need comments to edit a settings file by 
hand, you shouldn't do that. :-)

-- 
Benoît Minisini




More information about the User mailing list