events.key broken in latest svn

I sent a note a while ago about a key events being broken. I have a bit more information, but still no solution:

  - Other mouse-based events seem to work just fine
  - Key events broke somewhere between 2007-11-7 and 2007-11-10

-Rob

···

----
Rob Hetland, Associate Professor
Dept. of Oceanography, Texas A&M University
http://pong.tamu.edu/~rob
phone: 979-458-0096, fax: 979-845-6331

I am using tkagg with svn and key events are working. Just to make
sure we are doing exactly the same thing, I am running
examples/simple_plot.py with -dTkAgg and clicking in the subplot area
and then pressing 'g' to toggle the grid on and off. Does this not
work for you. In your earlier post, you mentioned something about
carbon. Can you give some more details on your exact environment?

JDH

···

On Nov 20, 2007 7:44 AM, Rob Hetland <hetland@...345...> wrote:

I sent a note a while ago about a key events being broken. I have a
bit more information, but still no solution:

  - Other mouse-based events seem to work just fine
  - Key events broke somewhere between 2007-11-7 and 2007-11-10

I am using Mac OS X 10.4.11, python 2.5, and svn versions of numpy and mpl. I use Tk/Tcl 8.4.7 that (if I remember right) came with the OS. I did not use the simple_plot, but I did try the 'g' trick on a normal plot, and tried to run the keypress_demo. So, although I didn't do _exactly_ what you are doing, it is essentially the same.

I am using Rev: 3393 (Last Changed Date: 2007-06-14 20:29:49 +0200 (Thu, 14 Jun 2007)) right now, and it works there.

-Rob

···

On Nov 20, 2007, at 3:12 PM, John Hunter wrote:

I am using tkagg with svn and key events are working. Just to make
sure we are doing exactly the same thing, I am running
examples/simple_plot.py with -dTkAgg and clicking in the subplot area
and then pressing 'g' to toggle the grid on and off. Does this not
work for you. In your earlier post, you mentioned something about
carbon. Can you give some more details on your exact environment?

----
Rob Hetland, Associate Professor
Dept. of Oceanography, Texas A&M University
http://pong.tamu.edu/~rob
phone: 979-458-0096, fax: 979-845-6331

Are you on this box now to verify the problem? There was a bug in
keypress_demo, because the demo was using 'g' to turn the grid on and
off and the default key interaction was doing the same, resulting in a
double toggle and no change. I fixed this bug in svn. I looked
through the diffs from r3393 to present and cannot find anything which
explains the difference.

I'm assuming that some of the other key events (eg press 'x' when
panning to constrain the zoom to the x axis) are also failing. And
you have the window focus (click on the subplot) when testing...

JDH

···

On Nov 20, 2007 9:15 AM, Rob Hetland <hetland@...345...> wrote:

On Nov 20, 2007, at 3:12 PM, John Hunter wrote:

I am using Mac OS X 10.4.11, python 2.5, and svn versions of numpy
and mpl. I use Tk/Tcl 8.4.7 that (if I remember right) came with the
OS. I did not use the simple_plot, but I did try the 'g' trick on a
normal plot, and tried to run the keypress_demo. So, although I
didn't do _exactly_ what you are doing, it is essentially the same.

Are you on this box now to verify the problem? There was a bug in
keypress_demo, because the demo was using 'g' to turn the grid on and
off and the default key interaction was doing the same, resulting in a
double toggle and no change. I fixed this bug in svn. I looked
through the diffs from r3393 to present and cannot find anything which
explains the difference.

I'm assuming that some of the other key events (eg press 'x' when
panning to constrain the zoom to the x axis) are also failing. And
you have the window focus (click on the subplot) when testing...

So I re-installed from the latest SVN, and can re-confirm that keypress events do not work. I also noticed that this error message shows up (the one you allude to above):

2007-11-20 18:13:23.074 Python[24184] *** _NSAutoreleaseNoPool(): Object 0x409e190 of class NSCarbonWindowContentView autoreleased with no pool in place - just leaking

This error message does _not_ appear when I revert back to the 2007-11-7 version where keypress events work. I am not sure if they are related, but it seems likely. This error shows up when a figure is created (I used ipython and debug-annoying, as the error does not appear in a debug log):

>>> figure()
FigureCanvasAgg.draw
RendererAgg.__init__
RendererAgg.__init__ width=640.0, height=480.0
RendererAgg.__init__ _RendererAgg done
RendererAgg.__init__ done
2007-11-20 18:21:32.073 Python[24293] *** _NSAutoreleaseNoPool(): Object 0x180822b0 of class NSCarbonWindowContentView autoreleased with no pool in place - just leaking
FigureCanvasAgg.draw
RendererAgg.__init__
RendererAgg.__init__ width=654.0, height=494.0
RendererAgg.__init__ _RendererAgg done
RendererAgg.__init__ done
     <matplotlib.figure.Figure instance at 0x18618e40>
>>>

-Rob

···

On Nov 20, 2007, at 5:09 PM, John Hunter wrote:

----
Rob Hetland, Associate Professor
Dept. of Oceanography, Texas A&M University
http://pong.tamu.edu/~rob
phone: 979-458-0096, fax: 979-845-6331

I googled this message and found this:

http://www.cocoabuilder.com/archive/message/cocoa/2004/6/25/110592

I think we are going to need some help from a cocoa person.... I CCd
Charlie, who did some of the work on the cocoa agg backend...

JDH

···

On Nov 20, 2007 11:24 AM, Rob Hetland <hetland@...345...> wrote:

2007-11-20 18:13:23.074 Python[24184] *** _NSAutoreleaseNoPool():
Object 0x409e190 of class NSCarbonWindowContentView autoreleased with
no pool in place - just leaking