Ticket #853 (closed defect: fixed)
Keystroke rebinding error
| Reported by: | https://me.yahoo.com/postrockrob#52e3a | Owned by: | rob |
|---|---|---|---|
| Priority: | major | Milestone: | 0.15 |
| Component: | multikey | Keywords: | |
| Cc: |
Description
Bug report on OS X:
#---- System Information ----# Peppy Version: 0.14.2 Operating System: Mac OS X (Darwin 10.4.0 i386) Mac OSX: 10.6.4 Python Version: 2.6.1 (r261:67515, Feb 11 2010, 15:47:53) [GCC 4.2.1 (Apple Inc. build 5646)] wxPython Version: 2.8.11.0 (mac-unicode) wxPython Info: (__WXMAC__, wxMac, unicode, wx-assertions-on, SWIG-1.3.29, mac-cg, mac-native-tb) Python Encoding: Default=ascii File=utf-8 wxPython Encoding: latin1 System Architecture: 64bit i386 Byte order: little Frozen: False #---- End System Information ----# #---- Traceback Info ----# *** Fri Jul 2 15:53:29 2010 *** Traceback (most recent call last): File %22//usr/local/lib/wxPython-unicode-2.8.11.0/lib/python2.6/site-packages/wx-2.8-mac-unicode/wx/_core.py%22, line 14640, in <lambda> lambda event: event.callable(*event.args, **event.kw) ) File %22/Library/Python/2.6/site-packages/peppy-0.14.2-py2.6.egg/peppy/fileopener.py%22, line 244, in finalizeAfterSuccessfulLoad mode = self.frame.tabs.newMode(self.buffer, mode_to_replace=self.mode_to_replace) File %22/Library/Python/2.6/site-packages/peppy-0.14.2-py2.6.egg/peppy/notebook.py%22, line 291, in newMode self.updateWrapper(wrapper) File %22/Library/Python/2.6/site-packages/peppy-0.14.2-py2.6.egg/peppy/notebook.py%22, line 206, in updateWrapper self.frame.switchMode() File %22/Library/Python/2.6/site-packages/peppy-0.14.2-py2.6.egg/peppy/frame.py%22, line 698, in switchMode self.setMenumap(mode) File %22/Library/Python/2.6/site-packages/peppy-0.14.2-py2.6.egg/peppy/frame.py%22, line 474, in setMenumap self.root_accel.updateActions(self.show_toolbar) File %22/Library/Python/2.6/site-packages/peppy-0.14.2-py2.6.egg/peppy/menu.py%22, line 314, in updateActions self.manageFrame(self.frame, *ctrls) File %22/Library/Python/2.6/site-packages/peppy-0.14.2-py2.6.egg/peppy/lib/multikey.py%22, line 1075, in manageFrame self.bindEvents(frame, *ctrls) File %22/Library/Python/2.6/site-packages/peppy-0.14.2-py2.6.egg/peppy/lib/multikey.py%22, line 1190, in bindEvents self.rebuildAllKeyBindings() File %22/Library/Python/2.6/site-packages/peppy-0.14.2-py2.6.egg/peppy/lib/multikey.py%22, line 1213, in rebuildAllKeyBindings self.rebuildRootKeyBindings() File %22/Library/Python/2.6/site-packages/peppy-0.14.2-py2.6.egg/peppy/lib/multikey.py%22, line 771, in rebuildRootKeyBindings self.rebuildWindowKeyBindings(self.multikey_binding_to_action) File %22/Library/Python/2.6/site-packages/peppy-0.14.2-py2.6.egg/peppy/lib/multikey.py%22, line 777, in rebuildWindowKeyBindings self.bindKeystrokes(key_binding, action, window) File %22/Library/Python/2.6/site-packages/peppy-0.14.2-py2.6.egg/peppy/lib/multikey.py%22, line 796, in bindKeystrokes raise DuplicateKeyError(%22Key sequence %s for action %s already mapped to %s for window %s%22 % (str([str(k) for k in keystrokes[:-1]]), action, existing.getAction(window), window)) DuplicateKeyError: Key sequence [] for action DeleteWindow id=0x1c341a10 mode=<peppy.fundamental.FundamentalMode; proxy of <Swig Object of type wxStyledTextCtrl * at 0x1b2dd960> > frame=BufferFrame peppy: Window #2 id=0x1b179870 already mapped to Cut id=0x1c341810 mode=<peppy.fundamental.FundamentalMode; proxy of <Swig Object of type wxStyledTextCtrl * at 0x1b2dd960> > frame=BufferFrame peppy: Window #2 id=0x1b179870 for window None #---- End Traceback Info ----#
but couldn't duplicate it. Eventually, I did run into something similar:
Traceback (most recent call last):
File "/data2/home/rob/src/peppy/peppy/notebook.py", line 91, in OnTabChanged
self.frame.switchMode()
File "/data2/home/rob/src/peppy/peppy/frame.py", line 720, in switchMode
self.setMenumap(mode)
File "/data2/home/rob/src/peppy/peppy/frame.py", line 491, in setMenumap
self.root_accel.updateActions(self.show_toolbar)
File "/data2/home/rob/src/peppy/peppy/menu.py", line 314, in updateActions
self.manageFrame(self.frame, *ctrls)
File "/data2/home/rob/src/peppy/peppy/lib/multikey.py", line 1075, in manageFrame
self.bindEvents(frame, *ctrls)
File "/data2/home/rob/src/peppy/peppy/lib/multikey.py", line 1190, in bindEvents
self.rebuildAllKeyBindings()
File "/data2/home/rob/src/peppy/peppy/lib/multikey.py", line 1213, in rebuildAllKeyBindings
self.rebuildRootKeyBindings()
File "/data2/home/rob/src/peppy/peppy/lib/multikey.py", line 771, in rebuildRootKeyBindings
self.rebuildWindowKeyBindings(self.multikey_binding_to_action)
File "/data2/home/rob/src/peppy/peppy/lib/multikey.py", line 777, in rebuildWindowKeyBindings
self.bindKeystrokes(key_binding, action, window)
File "/data2/home/rob/src/peppy/peppy/lib/multikey.py", line 796, in bindKeystrokes
raise DuplicateKeyError("Key sequence %s for action %s already mapped to %s for window %s" % (str([str(k) for k in keystrokes[:-1]]), action, existing.getAction(window), window))
DuplicateKeyError: Key sequence [] for action RebindSingleKeyAction id=0x56ea910 mode=<__builtin__.KeybindingMode; proxy of <Swig Object of type 'wxPanel *' at 0x56365a0> > frame=BufferFrame peppy: Window #1 id=0x4c9ba10 already mapped to DeleteWindow id=0x592cdd0 mode=<__builtin__.KeybindingMode; proxy of <Swig Object of type 'wxPanel *' at 0x56365a0> > frame=BufferFrame peppy: Window #1 id=0x4c9ba10 for window None
that I caused by trying to set a multi-key keybinding using C-RET, but hitting C-RET immediately. Apparently the empty keybinding gets entered, because if I use C-RET again and actually use a key, say SPC, I get ['', 'SPC'].
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
