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

Michael Van Canneyt michael at freepascal.org
Fri Jan 19 13:29:34 CET 2007

On Fri, 19 Jan 2007, Graeme Geldenhuys wrote:

> On 1/19/07, Bogusław Brandys <brandys at o2.pl> wrote:
> > TRegistry under Linux is simulated using XML file (this is afaik
> > > TXMLRegistry class inside)
> > >
> > > FPC 2.1.1 is a proper version for registry under Linux.2.0.4 had bugs
> > here.
> > 
> > I'm using FPC 2.1.1!   I found when the problem occurs.  When a form
> > is loaded or closed, it's state is saved.  This is handled by the
> > tiOPF framework.  The tiOPF framework uses TRegINIFile for storing
> > that State information.  I thought it would use a .ini file as
> > supplied by tiOPF, instead of a hard-coded reg.xml file as defined in
> > FPC.

I fixed a bug in TInifile only yesterday. Maybe that is it.
Loading form state should work, saving may still exhibit the problem.

> > 
> > If I can't get this sorted in FPC, maybe I should change tiOPF to
> > rather use the TINIFile class under Linux instead.  At least that will
> > mean anybody using tiOPF with FPC 2.0.4 will also be able to save
> > their Forms State information, where currently they can't.

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.


More information about the fpc-devel mailing list