2013/11/27 Sven Barth <[email protected]> > Am 27.11.2013 16:53, schrieb Frederic Da Vitoria: > > 2013/11/27 Sven Barth <[email protected]> > >> Am 27.11.2013 16:30, schrieb Frederic Da Vitoria: >> >> 2013/11/27 leledumbo <[email protected]> >> >>> >From http://wiki.lazarus.freepascal.org/xmlconf, looks like simply >>> setting >>> FileName will do. >>> >> >> Yes, that part works. I dislike the way it works (Implicit saving does >> not seem very Pascal-ish to me), but it does save a file. My issues are >> rather with the xml, but I'll rather answer to waldo kitty here >> >> TIniFile and TMemIniFile do an implicit save as well... (the former >> during each .Write* the latter during destruction) >> >> Regards, >> Sven >> > > Yes. But my Pascal reference is Assign - Reset/Rewrite, Close. I still > have difficulties appending "File" after Assign and Close :-P > > But XmlConfig is AFAIK a spiritual "successor" to TIniFile which is why I > brought it up. >
Ah, OK. > Now that I think of it, I never tried to do a new AssignFile after the > Reset/Rewrite step, but I would be much surprised if it flushed and closed > the first file handle. > > It won't flush or close the file, but if you haven't copied the Textfile > or File variable somewhere else then you'll lose the reference to the file. > It will be closed when the application is terminated, but everything that > was not flushed until the Assign will stay in the buffer and won't be in > the file... Of course this problem is a bit theoretical and is not really > related to your problem :) > Absolutely :-) -- Frederic Da Vitoria (davitof) Membre de l'April - « promouvoir et défendre le logiciel libre » - http://www.april.org
-- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
