Goto button in GTK print preview (for wx.Grid data)

Hi

I just got a bug report on the print preview function for wx.Grid data
in wxPython 2.9 (GTK port on Debian unstable / Ubuntu 8.04, Python 2.5).

I can reproduce this behavior in the wxPython demo.

Bug report:

The "Goto..." selection in the print preview assumes the user will
enter a number between 1-100, but does not actually check the error
bounds. Thus, negative numbers may be entered and the program will
navigate to the non-existent sheet.

1. Select the "Goto..." option on the menu bar of the print preview
screen.

2. Enter -10.

The message bar at the bottom will display "Page -10 of 100" and the
preview will turn blank.

Is this a wxPython bug? Is there a workaround?

Can I disable the Goto Button somehow or change the dialog box that is
called in order to check bounds?

Thanks in advance

Martin

No replies so far?

Should I just send a bug report?

Martin

···

On Fri, 8 May 2009 22:54:51 +0200 mmanns@gmx.net wrote:

I just got a bug report on the print preview function

mmanns@gmx.net wrote:

Hi

I just got a bug report on the print preview function for wx.Grid data
in wxPython 2.9 (GTK port on Debian unstable / Ubuntu 8.04, Python 2.5).

I can reproduce this behavior in the wxPython demo.

Bug report:

The "Goto..." selection in the print preview assumes the user will
enter a number between 1-100, but does not actually check the error
bounds. Thus, negative numbers may be entered and the program will
navigate to the non-existent sheet.

1. Select the "Goto..." option on the menu bar of the print preview
screen.

2. Enter -10.

The message bar at the bottom will display "Page -10 of 100" and the
preview will turn blank.

Is this a wxPython bug? Is there a workaround?

It's a wx bug. Please create a ticket for it in wxTrac.

Can I disable the Goto Button somehow or change the dialog box that is
called in order to check bounds?

From the preview frame (after it is initialized) you can get to the button on the toolbar, its ID will be wx.ID_PREVIEW_GOTO. With the button you can enable/disable it, override its event handlers, etc.

···

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

mmanns@gmx.net wrote:

···

On Fri, 8 May 2009 22:54:51 +0200 > mmanns@gmx.net wrote:

I just got a bug report on the print preview function

No replies so far?

Should I just send a bug report?

Or you could grow some patience. 23 hours on a sunny weekend is a bit of a rush for people who are volunteering their time to the project, don't you think?

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

Sorry for sounding impatient.
I just was not sure if I posted to the right place.

Thanks a lot for your help.
I really appreciate your wxPython efforts!

Martin

···

On Sat, 09 May 2009 13:35:23 -0700 Robin Dunn <robin@alldunn.com> wrote:

mmanns@gmx.net wrote:
> On Fri, 8 May 2009 22:54:51 +0200 > > mmanns@gmx.net wrote:
>
>> I just got a bug report on the print preview function
>
> No replies so far?
>
> Should I just send a bug report?

Or you could grow some patience. 23 hours on a sunny weekend is a
bit of a rush for people who are volunteering their time to the
project, don't you think?