[fpc-devel] Error: Unable to create "reg.xml" file

Marco van de Voort marcov at stack.nl
Fri Jan 19 14:12:51 CET 2007


> On 1/19/07, Michael Van Canneyt <michael at freepascal.org> wrote:
> 
> > I fixed a bug in TInifile only yesterday. Maybe that is it.
> > Loading form state should work, saving may still exhibit the problem.
> 
> Thanks, I'll get another FPC update and retest.  The problem occurred
> mostly at the save stage (closing a form).
> 
> > I would recommend using TIniFile anyway, even on windows.
> > Using the registry is Bad (tm). At my job we started with the registry,
> > but in the end moved everything to Ini files. Much more practical, and
> > portable to boot.
> 
> I fully agree!  I hate the registry.  I have actually just completed
> the change in tiOPF to rather use TIniFile under Linux, even if you
> call gINI or gReg singleton functions in the tiOPF framework.
> Unfortunately I can't change the gReg function under Windows as there
> are other users relying on the Registry for settings.
> 
> As for my own apps and any user settings, I call gINI which stores
> them in a .ini file on both Windows and Linux.

There is one  dangerous caution against overzealous inifile use: with
lessened privileges (a situation that is going to become more frequent under
Vista, iow, user has no admin rights), apps can't write to "program files/"
with the default permissions, and must use special directories for this.




More information about the fpc-devel mailing list