Author indiedan
Recipients indiedan, ocean-city, skomoroh
Date 2008-09-12.12:14:57
SpamBayes Score 1.55879e-05
Marked as misclassified No
Message-id <1221221715.91.0.959030691495.issue3774@psf.upfronthosting.co.za>
In-reply-to
Content
Please forgive my rookie bug filing:

I'm getting this bug / crash sometimes when Menu.delete() is called too

It seems to be because self.index( ) sometimes returns None which is of 
course un-iterable and delete() tries to iterate through it:

for i in range(self.index(index1), self.index(index2)+1):

As a fix the previous (simpler) delete works for me, but I don't 
understand the purpose of the extra self.deletecommand() code appended 
so I'm probably missing something.

My crash:
  File "C:\CCPN\ccpn\python\memops\gui\Menu.py", line 127, in 
deleteMenuItems
    self.delete(0, Tkinter.END)
  File "C:\Python26\lib\lib-tk\Tkinter.py", line 2665, in delete
    for i in range(self.index(index1), self.index(index2)+1):
TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'
History
Date User Action Args
2008-09-12 12:15:15indiedansetrecipients: + indiedan, ocean-city, skomoroh
2008-09-12 12:15:15indiedansetmessageid: <1221221715.91.0.959030691495.issue3774@psf.upfronthosting.co.za>
2008-09-12 12:14:57indiedanlinkissue3774 messages
2008-09-12 12:14:57indiedancreate