1- What is the signal to catch for Destroy? The one when you click on destroy_window
2- Why doesn’t all my app windows get deleted when I close the main window? How do I do a full exit, do I need to emit a destroy signal? Does it matter if second window is also a wxApp?
3- Is there away to redirect all errors (python/wx/whatever) to a pop-up dialogs?
1- What is the signal to catch for Destroy? The one when you click on
destroy_window
EVT_CLOSE(win, func)
2- Why doesn't all my app windows get deleted when I close the main
window? How do I do a full exit, do I need to emit a destroy signal?
Does it matter if second window is also a wxApp?
If the other windows are children of the main window, they should get
automatically closed. There should be only one wxApp.
3- Is there away to redirect all errors (python/wx/whatever) to a pop-up
dialogs?
Wrap your entire program in a try: except: clause like so:
from wxPython.wx import *
import sys, traceback
from StringIO import StringIO
> 3- Is there away to redirect all errors (python/wx/whatever) to a pop-up
> dialogs?
Take a look at the definition of wxApp in wx.py. It allows you to specify
in the constructor that Python's stdout and stderr will be redirected to a
window. Also, if you use the hybrid version of wxPython (on Win32) then
many of wxWindows errors will go to pop-up dialogs by default.
···
--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters? http://wxPython.org Relax with wxPython!
I've got some working code for this which I'll be submitting for inclusion
in wxPython/lib very shortly...
Chris
···
-------------------------------------------------------------------------
Chris Fama <mailto:Chris.Fama@whollysnakes.com>
or <mailto:Chris.Fama@uq.net.au>
Brisbane, Australia
Phone: (0/+61)(7) 3870 5639 {10am-10pm GMT+10 on both these numbers please}
Mobile: (0/+61)(400) 833 700
-------------------------------------------------------------------------
Business page: <http://whollysnakes.com>
Personal page: <http://uq.net.au/~zzcfama>
-------------------------------------------------------------------------
----- Original Message -----
From: "Robin Dunn" <robin@alldunn.com>
To: <wxpython-users@lists.wxwindows.org>
Sent: Wednesday, October 03, 2001 11:41 AM
Subject: Re: [wxPython] Simple questions
> > 3- Is there away to redirect all errors (python/wx/whatever) to a
pop-up
> > dialogs?
>
Take a look at the definition of wxApp in wx.py. It allows you to specify
in the constructor that Python's stdout and stderr will be redirected to a
window. Also, if you use the hybrid version of wxPython (on Win32) then
many of wxWindows errors will go to pop-up dialogs by default.
--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters? http://wxPython.org Relax with wxPython!