Platform win32
I was about to release an application, when I realized in last minutes
tests, wxPrintDialog could crash the application.
I do not know if it is a wxWidgets or wxPython issue and I really do
not know if it can be considered as an issue !
How to reproduce this (w2k)
1) In a wx app, open a wx.PrintDialog.
2) The dialog is displayed, and depending on the installed printers
various tabs are added to this dlg window.
3) Select one of these added tabs (*not* the first one).
4) [X] or Cancel button -> app crashes
Comments
- Python 2.5, w2k sp4, wxPython 2.8.3.0 .
- Python 2.5, w2k sp4, wxPython 2.6.3, same behaviour.
- No crash with the first tab (general).
- Same issue with wxPython demo.
- I toyed a lot. It seems it is impossible to catch the error with something
like (Python demo):
if not printer.Print(self.frame, printout, True):
wx.MessageBox("There was a problem printing.\nPerhaps your current printer is not set correctly?", "Printing", wx.OK)
else:
self.printData = wx.PrintData( printer.GetPrintDialogData().GetPrintData() )
printout.Destroy()
or
wx.Printer_instance.GetLastError()= wx.PRINTER_ERROR
- When browsing the various wx*-lists, I did not find too much information.
- Test with various printers, including PDFCreator.
- On XP sp2, the wx.PrintDialog is not desplayed in the same way as on w2k,
only the "general" tab is displayed. Printer tuning is achieved through
an added button. XP does not suffer from this issue.
I'm aware w2k will soon or later be an "old timer". Anyway, it is still
alive.
Regards
Jean-Michel Fauth, Switzerland