Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2010-10

TXMLPropstorage not consistently saviing

8 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

A.J. Venter

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

Reply by email

A.J. Venter

I guess nobody has an answer for me ? :S

I know I've been out of the lazarus scene for a while but I was almost entirely out of the development scene for a few months (needed a break) - now I've begun a pretty awesome new project in lazarus so I'll be quite active again (and since most of my previous projects ended up with me contributing something to lazarus because I needed a feature, coded it and submitted it, it's good odds this will happen again). :P

Lol now it sounds like I'm trying to bribe an answer out - I'm not, just sorta thought I'd throw in a high-there-I-am-back to the people who remember me :P

-------

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

Reply by email

Michael Van Canneyt
to A.J. Venter: I'm having a really weird problem with TXMLPropstorage (using lazarus SVN from Saturday).…

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

Michael.

A.J. Venter wrote 37 lines
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 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Graeme Geldenhuys
to A.J. Venter: I guess nobody has an answer for me ? :S I know I've been out of the lazarus scene for a…

Op 2010-10-19 11:19, A.J. Venter het geskryf:

I know I've been out of the lazarus scene for a while but I was almost entirely out of the development scene for a few months (needed a break)

It seems you have just been doing what your blob site says: silentcoder :)

Hope the break was good.... I sometimes feel I need such a break too. Sometimes I feel I should pack up and go to South America, so I can go hug some trees. :-)

Sorry I don't have an answer to your question.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net:8080/fpgui/

Reply by email

A.J. Venter
to Michael Van Canneyt: Can you post a sample project, so we can test it ? Michael.

I'll get some up as soon as I get home tonight. The only copy of the early stuff so far is on my home PC (while I'm at it, I need to get it version controlled before it gets any bigger anyway :P )

A.J.

Michael Van Canneyt wrote 51 lines
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 > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
A.J. Venter Founder and lead developer, Kongoni GNU/Linux www.kongoni.co.za www.silentcoder.co.za - Blog

Reply by email

A.J. Venter
to A.J. Venter

Hey guys, was anybody able to reproduce this ? Is it a bug ? Or am I just misunderstanding documentation ?

I am holding back on any more commits to the tree in the meantime because I don't want to make the code in the example any more complex than it has to be - specifically to make it easier to reproduce the issue.

A.J. Venter wrote 13 lines
> > On Tue, Oct 19, 2010 at 11:22 AM, Michael Van Canneyt > wrote: >> >> Can you post a sample project, so we can test it ? >> >> Michael. As promised here is the code as it stands: svn co https://preside.svn.sourceforge.net/svnroot/preside/trunk preside Which should replicate the issue I hope.
A.J. Venter Founder and lead developer, Kongoni GNU/Linux www.kongoni.co.za www.silentcoder.co.za - Blog

Reply by email

Michael Van Canneyt
to A.J. Venter

Hi,

I missed your post with the link. Now I saw it, and I will check it later today.

Michael.

A.J. Venter wrote 37 lines
Hey guys, was anybody able to reproduce this ? Is it a bug ? Or am I just misunderstanding documentation ? I am holding back on any more commits to the tree in the meantime because I don't want to make the code in the example any more complex than it has to be - specifically to make it easier to reproduce the issue. On Tue, Oct 19, 2010 at 6:33 PM, A.J. Venter wrote: >> >> On Tue, Oct 19, 2010 at 11:22 AM, Michael Van Canneyt >> wrote: >>> >>> Can you post a sample project, so we can test it ? >>> >>> Michael. > > As promised here is the code as it stands: > svn co https://preside.svn.sourceforge.net/svnroot/preside/trunk preside > > Which should replicate the issue I hope. > -- A.J. Venter Founder and lead developer, Kongoni GNU/Linux www.kongoni.co.za www.silentcoder.co.za - Blog -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email