PrintDialogData.GetAllPages() always returns True

(Using wxPython 2.4.0.7 on win32)

I am creating a wxPrintDialog, setting the page number info etc, but
when the user selects a page range, and selects the "pages" radio button
in the print dialog, GetAllPages() still returns 1. am I doing something
wrong here? I even tried recreating the PrintDialogData object after the
user had interacted with it, thinking that that may have been necessary,
but it makes no difference. Here is the relevant code snippet:

    dlg = wxPrintDialog(self)
    pdd = dlg.GetPrintDialogData()
    pdd.EnablePageNumbers(True)
    pdd.SetMinPage(1)
    pdd.SetMaxPage(len(self.pages))
    pdd.SetFromPage(self.curpage + 1)
    pdd.SetToPage(self.curpage + 1)
    if (dlg.ShowModal() != wxID_OK):
        exit
    if pdd.GetAllPages():
        print "allpages"
        printrange = range(len(self.pages))
    else:
        print "pagerange"
        printrange = range(pdd.GetFromPage() - 1, pdd.GetToPage())

"allpages" gets printed out every time. Any ideas?

-Mark

Roach, Mark R. wrote:

(Using wxPython 2.4.0.7 on win32)

I am creating a wxPrintDialog, setting the page number info etc, but
when the user selects a page range, and selects the "pages" radio button
in the print dialog, GetAllPages() still returns 1. am I doing something
wrong here? I even tried recreating the PrintDialogData object after the
user had interacted with it, thinking that that may have been necessary,
but it makes no difference. Here is the relevant code snippet:

    dlg = wxPrintDialog(self)
    pdd = dlg.GetPrintDialogData()
    pdd.EnablePageNumbers(True)
    pdd.SetMinPage(1)
    pdd.SetMaxPage(len(self.pages))
    pdd.SetFromPage(self.curpage + 1)
    pdd.SetToPage(self.curpage + 1)
    if (dlg.ShowModal() != wxID_OK):
        exit
    if pdd.GetAllPages():
        print "allpages"
        printrange = range(len(self.pages))
    else:
        print "pagerange"
        printrange = range(pdd.GetFromPage() - 1, pdd.GetToPage())

"allpages" gets printed out every time. Any ideas?

Sounds like a bug to me. Please enter a bug report about it, with a category of wxMSW.

···

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

Roach, Mark R. wrote:
> (Using wxPython 2.4.0.7 on win32)
>
> I am creating a wxPrintDialog, setting the page number info etc, but
> when the user selects a page range, and selects the "pages" radio button
> in the print dialog, GetAllPages() still returns 1. am I doing something

[snip]

Sounds like a bug to me. Please enter a bug report about it, with a
category of wxMSW.

Will do. I assume I file it against wxPython and not wxWindows...?

-Mark

···

On Tue, 2003-05-20 at 14:10, Robin Dunn wrote:

Well, I found the source of the bug and patched my local copy, but I'm
wondering, is there some other way to get patches into wxwindows other
than the website? patches seem to linger out there. I imagine that's a
result of such a high volume of patches. Would an email to the
developers list help or would I be plonked into oblivion? It seems like
a pretty big deal for the print dialog to be so broken.

Also, I noticed that a number of PrintDialogData methods are not
available in wxPython. Adding them to the .i file and reSWIGing seems to
make them work just fine, was their absence intentional and I'm just
missing something, or is it a bug?

Thanks, and sorry for making so much noise on the list recently.

-Mark

···

On Tue, 2003-05-20 at 14:10, Robin Dunn wrote:

Roach, Mark R. wrote:
> (Using wxPython 2.4.0.7 on win32)

Sounds like a bug to me. Please enter a bug report about it, with a
category of wxMSW.

Roach, Mark R. wrote:

Roach, Mark R. wrote:

(Using wxPython 2.4.0.7 on win32)

Sounds like a bug to me. Please enter a bug report about it, with a category of wxMSW.

Well, I found the source of the bug and patched my local copy, but I'm
wondering, is there some other way to get patches into wxwindows other
than the website? patches seem to linger out there. I imagine that's a
result of such a high volume of patches. Would an email to the
developers list help or would I be plonked into oblivion? It seems like
a pretty big deal for the print dialog to be so broken.

Do both. The patch at SF will ensure that it doesn't get lost, sending a mail to wx-dev will help it get a bit more attention.

Also, I noticed that a number of PrintDialogData methods are not
available in wxPython. Adding them to the .i file and reSWIGing seems to
make them work just fine, was their absence intentional and I'm just
missing something, or is it a bug?

Either an oversight or things were added to the C++ version after the Python version was done and I didn't notice the addition. Please send me your changes to the .i file.

···

On Tue, 2003-05-20 at 14:10, Robin Dunn wrote:

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