I have some layouts which drive me crazy with persist, I trying to debug things and I notice that if any sub-window does NOT restore HasRestored will return False. Is the documentation wrong or the code?
def HasRestored(self):
"""
This method returns ``True`` if any of the windows managed by
:class:`PersistenceManager` has had its settings restored.
This is with 2.9.5.0.b20121231
I also noticed that ScrolledWindowHandler.Restore returns None instead of True.
I have some layouts which drive me crazy with persist, I trying to debug things and I notice that if any sub-window does NOT restore HasRestored will return False. Is the documentation wrong or the code?
def HasRestored(self):
"""
This method returns ``True`` if any of the windows managed by
:class:`PersistenceManager` has had its settings restored.
This is with 2.9.5.0.b20121231
I also noticed that ScrolledWindowHandler.Restore returns None instead of True.
Assuming that the doc is correct, attached is a patch.
I added a prop to keep track of the restore status and then return that and there were two places where the return in my view be True.
This is one more patch which didn't make it, I haven't had feedback
from Andrea on this one.
It works for me, but it would be good if someone else using persist
could confirm that it is working for them too.
The change ensures that we get if "any" window got restored the
method “HasRestored” will return “True”, before we would get the
restore status of the last window and there for a couple of handlers
which did not return “True” on restore.
Subject:
Re: [wxPython-users] wx.lib.agw.persist
Date:
Mon, 22 Apr 2013 17:39:43 +0200
From:
werner
Reply-To:
To: wbruhin@free.frwxpython-users@googlegroups.comwxpython-users@googlegroups.com
Hi,
On 22/04/2013 15:16, Werner wrote:
> Hi,
>
> I have some layouts which drive me crazy with persist, I trying to > debug things and I notice that if any sub-window does NOT restore > HasRestored will return False. Is the documentation wrong or the code?
>
>
> def HasRestored(self):
> """
> This method returns ``True`` if any of the windows managed by
> :class:`PersistenceManager` has had its settings restored.
>
> This is with 2.9.5.0.b20121231
>
> I also noticed that ScrolledWindowHandler.Restore returns None instead > of True.
Assuming that the doc is correct, attached is a patch.
I added a prop to keep track of the restore status and then return that and there were two places where the return in my view be True.
Werner
-- You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to .
For more options, visit .