Calling getcurselection on PmwScrolledListBox when nothing is selected gets
this error:
File
"C:\Python25\Lib\site-packages\Pmw\Pmw_1_3\lib\PmwScrolledListBox.py", line
129, in getcurselection
rtn.append(self._listbox.get(sel))
File "C:\Python25\lib\lib-tk\Tkinter.py", line 2499, in get
return self.tk.call(self._w, 'get', first)
TclError: bad listbox index "None": must be active, anchor, end, @x,y, or a
number
This is fixed by changing the method to:
def getcurselection(self):
rtn = []
for sel in self.curselection():
if sel != "None":
rtn.append(self._listbox.get(sel))
return tuple(rtn)
Nobody/Anonymous ( nobody ) - 2008-09-06 15:24
5
Open
None
Nobody/Anonymous
None
None
Public
|
Date: 2009-07-07 15:33 Hi |
Copyright © 2009 Geeknet, Inc. All rights reserved. Terms of Use