[wxPython-dev] wxPython2.7-win32-unicode-2.7.0.1pre.20060909-py25.exe - int object is not callable

jmf jfauth at bluewin.ch
Sat Sep 16 08:04:36 PDT 2006


Chris Spencer wrote:
 > You know what...
 >
 > Ignore this.  KeyCode *should* be an attribute.  In place of
 > event.KeyCode(), use event.GetKeyCode().  Or you can simply use
 > "key=event.KeyCode"
 >
 > I went through all of BOA and changed all instances of ".KeyCode()" to
 > ".GetKeyCode()" and all works fine.

Sorry, I had intended to mention this change...  KeyCode has been an
undocumented compatibility alias for GetKeyCode for about 3 years, and
it probably should have been generating a deprecation warning for a long
time now.  If people here prefer it I can switch it back to be an alias
for GetKeyCode and add the deprecation warning.  Or I can leave it as a
property and just mention it in the CHANGES file.

-----

Yesterday I noticed the discussion I introduced a few months ago
http://lists.wxwidgets.org/cgi-bin/ezmlm-cgi?13:msp:327:gklpchpiakmekfjmdngk
has lead to a very pleasant conclusion in wxPy 2.7.

The wxKeyEvents received a .GetModifiers() method. This is really a handy
method, which makes a correct key/char handling much easier and also
a cleaner code.
The use of this method and its advantage for "AltGr keyboards" users is 
emphasized in the wxWidgets/wxPython help file.
It will worth to write some words about this in the CHANGES files too.

Beside this, I agree for a depracating KeyCode() method. All methods are mainly
Get*** methods.

Jean-Michel Fauth, Switzerland




More information about the wxpython-dev mailing list