[Gambas-user] gb.settings comments deleted

Tobias Boege taboege at ...626...
Fri Dec 5 15:18:13 CET 2014


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

-- 
"There's an old saying: Don't change anything... ever!" -- Mr. Monk




More information about the User mailing list