[Lazarus] TXMLPropstorage not consistently saviing

Michael Van Canneyt michael at freepascal.org
Tue Oct 19 11:22:55 CEST 2010


Can you post a sample project, so we can test it ?

Michael.

On Mon, 18 Oct 2010, A.J. Venter wrote:

> Hi guys,
> I'm having a really weird problem with TXMLPropstorage (using lazarus
> SVN from Saturday). I actually have some calls to TXMLPropstorage.save
> to try and ensure it happens, but apparently it only creates the
> config file the very first time it's called. Then if you clean out the
> config file, no amount of anything I can come up with will restore it,
> or save new/updated settings to it.
>
> For a test I put a writeln into the TXMLPropStorage.OnSaveProperties
> event and it claims to be saving, but the file is not created. I don't
> want to generate a blank file at startup as I want to be able to test
> for the presence of the file and automatically open a settings dialog
> if it's not there.
> The component is on the settings dialog's form.
>
> There is a deliberate call to "save" in the event handler for the OK
> button, and another in the main form's onClose event.
>
> I cannot think what else there may be. Is there some way to force it
> to save it's current state at a given moment ? Or at least determine
> why it's not doing so already when I call the save method ?
>
> Thanks
> A.J.
>
> -- 
> A.J. Venter
> Founder and lead developer, Kongoni GNU/Linux
> www.kongoni.co.za
> www.silentcoder.co.za - Blog
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>




More information about the Lazarus mailing list