Error Running Printing Framework Example

Running the example from Chapter 17 in the wPIA book. It works OK until I
call OnPrintSetup(). This generates an error and segfault:

   File "printing.py", line 179, in OnPrintSetup
     dlg.GetPrintDialogData().SetSetupDialog(True)
AttributeError: 'PrintDialogData' object has no attribute 'SetSetupDialog'
Segmentation fault

   There does not appear to be a GetPrintDialogData() class in the new API
docs, although there are other Print and Preview classes there. Has this
been fixed or have I missed something entirely?

Rich

···

--
Richard B. Shepard, Ph.D. | The Environmental Permitting
Applied Ecosystem Services, Inc. | Accelerator(TM)
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863

Rich Shepard wrote:

  Running the example from Chapter 17 in the wPIA book. It works OK until I
call OnPrintSetup(). This generates an error and segfault:

  File "printing.py", line 179, in OnPrintSetup
    dlg.GetPrintDialogData().SetSetupDialog(True)
AttributeError: 'PrintDialogData' object has no attribute 'SetSetupDialog'
Segmentation fault

  There does not appear to be a GetPrintDialogData() class in the new API
docs, although there are other Print and Preview classes there. Has this
been fixed or have I missed something entirely?

The print setup dialog and related things have been deprecated and removed since that sample was written. An updated sample is in CVS and is accessible at http://cvs.wxwidgets.org/viewcvs.cgi/wxWidgets/wxPython/samples/wxPIA_book/Chapter-17/

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Robin,

   That's what I thought I was running, as I did not retype that long example
myself. Regardless, I'll check again.

   There's also a reference to Listing 17.2 in the book, but no listing 17.2.

Thanks,

Rich

···

On Mon, 12 Feb 2007, Robin Dunn wrote:

http://cvs.wxwidgets.org/viewcvs.cgi/wxWidgets/wxPython/samples/wxPIA_book/Chapter-17/

--
Richard B. Shepard, Ph.D. | The Environmental Permitting
Applied Ecosystem Services, Inc. | Accelerator(TM)
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863