def OnTimer(self, evt = None):
t = time.localtime(time.time())
self.idle += 1 #print self.idle
if self.idle == 5:#to manage with a value retrived from db!!!! #print 'bang'
self.OnExit()
self.Destroy()
This snip work on Debian Lenny but on
Windows XP it cause a 'freeze' of the app that don't respond to any
event even if it's visible on the screen.Then when I try to resize o
click on a button or menu after a 'certain' time
it 'finally' close.
Any hints?
Thanks
Beppe
On Wed, Dec 9, 2009 at 1:10 PM, Beppe <g.costanzi@email.it> wrote:
def OnTimer(self, evt = None):
t = time.localtime(time.time())
self.idle += 1 #print self.idle
if self.idle == 5:#to manage with a value retrived from db!!!! #print 'bang'
self.OnExit()
self.Destroy()
This snip work on Debian Lenny but on
Windows XP it cause a 'freeze' of the app that don't respond to any
event even if it's visible on the screen.Then when I try to resize o
click on a button or menu after a 'certain' time
it 'finally' close.
Any hints?
1) Suggest stopping the timer before you exit
2) What is the OnExit method your calling do? If it is telling the app
to exit the call to Destroy is unnecessary and could be causing a
double delete which could be why its hanging or crashing before
exiting.
Thanks Cody,
I've stopped the timer but the problem hold over...
In OnExit method I only close a db connection.
I'm thinking about the fact that in my app in the top level window I
put a timer to show the time in sysbar and I use an
analogclock...could I stop even this?
···
On 9 Dic, 20:24, Cody Precord <codyprec...@gmail.com> wrote:
Hi,
On Wed, Dec 9, 2009 at 1:10 PM, Beppe <g.costa...@email.it> wrote:
> def OnTimer(self, evt = None):
> t = time.localtime(time.time())
> self.idle += 1
> #print self.idle
> if self.idle == 5:#to manage with a value retrived from db!!!!
> #print 'bang'
> self.OnExit()
> self.Destroy()
> This snip work on Debian Lenny but on
> Windows XP it cause a 'freeze' of the app that don't respond to any
> event even if it's visible on the screen.Then when I try to resize o
> click on a button or menu after a 'certain' time
> it 'finally' close.
> Any hints?
1) Suggest stopping the timer before you exit
2) What is the OnExit method your calling do? If it is telling the app
to exit the call to Destroy is unnecessary and could be causing a
double delete which could be why its hanging or crashing before
exiting.
On Wed, Dec 9, 2009 at 1:53 PM, Beppe <g.costanzi@email.it> wrote:
Thanks Cody,
I've stopped the timer but the problem hold over...
In OnExit method I only close a db connection.
I'm thinking about the fact that in my app in the top level window I
put a timer to show the time in sysbar and I use an
analogclock...could I stop even this?
Try to reproduce the issue in a small runnable sample
The best thing to do would be to Close() all frames and let the app exit normally. BTW, OnExit should be automatically called by the system if you let the normal shutdown happen.
···
On 12/9/09 11:24 AM, Cody Precord wrote:
Hi,
On Wed, Dec 9, 2009 at 1:10 PM, Beppe<g.costanzi@email.it> wrote:
def OnTimer(self, evt = None):
t = time.localtime(time.time())
self.idle += 1 #print self.idle
if self.idle == 5:#to manage with a value retrived from db!!!! #print 'bang'
self.OnExit()
self.Destroy()
This snip work on Debian Lenny but on
Windows XP it cause a 'freeze' of the app that don't respond to any
event even if it's visible on the screen.Then when I try to resize o
click on a button or menu after a 'certain' time
it 'finally' close.
Any hints?
1) Suggest stopping the timer before you exit
2) What is the OnExit method your calling do? If it is telling the app
to exit the call to Destroy is unnecessary and could be causing a
double delete which could be why its hanging or crashing before
exiting.
where cfg.frm_main_istance is the instance of my top level window.
thanks a lot.
Beppe
···
On 9 Dic, 21:30, Robin Dunn <ro...@alldunn.com> wrote:
On 12/9/09 11:24 AM, Cody Precord wrote:
> Hi,
> On Wed, Dec 9, 2009 at 1:10 PM, Beppe<g.costa...@email.it> wrote:
>> def OnTimer(self, evt = None):
>> t = time.localtime(time.time())
>> self.idle += 1
>> #print self.idle
>> if self.idle == 5:#to manage with a value retrived from db!!!!
>> #print 'bang'
>> self.OnExit()
>> self.Destroy()
>> This snip work on Debian Lenny but on
>> Windows XP it cause a 'freeze' of the app that don't respond to any
>> event even if it's visible on the screen.Then when I try to resize o
>> click on a button or menu after a 'certain' time
>> it 'finally' close.
>> Any hints?
> 1) Suggest stopping the timer before you exit
> 2) What is the OnExit method your calling do? If it is telling the app
> to exit the call to Destroy is unnecessary and could be causing a
> double delete which could be why its hanging or crashing before
> exiting.
The best thing to do would be to Close() all frames and let the app exit
normally. BTW, OnExit should be automatically called by the system if
you let the normal shutdown happen.
--
Robin Dunn
Software Craftsmanhttp://wxPython.org