New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tkinter Menu.delete bug #48024
Comments
When I create a menu item without command and them remove it, I have a |
I tried, and I confirmed released python2.5.2 runs fine. and |
I've not tested this so heavily, but patch could be simple. |
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 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 My crash: |
Probably your working copy is bit old. Please try latest file. # I've added nosy list from bpo-1342811. |
Python 2.6b2 was released with this bug, and got fixed later. |
I meant beta3, sorry. |
Oops, sorry, I misread the bug report, reopening it (let me go eat |
Thanks guys - I was running an old build. revision 65971 fixed this as Hirokazu mentioned. |
The patch attached is probably the most direct way to fix it, but, can |
Again, I meant the previously attached patch (the one by ocean-city) was |
Seems I found the bug. I've attached the patch for current py3k-trunk. |
My patch already does what is proposed in your patch, except yours may |
self.deletecommand doesn't remove menu item, so we don't have to care >>> a = [0, 1, 2, 3]
>>> for i in xrange(len(a)):
... del a[i]
...
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
IndexError: list assignment index out of range I'm not sure (self._tclCommands is not None) check is not really needed. P.S. Please look at http://www.tcl.tk/man/tcl8.5/TkCmd/menu.htm#M59 |
This "needcleanup" parameter indicates that the function added to And about that docstring.. yes, the change is needed. (I could swear I |
New patch, this one fixes the docstring previously mentioned and may set |
It may be because I'm calling delete incorrectly (I don't think so - see File "C:\CCPN\ccpn\python\memops\gui\Menu.py", line 127, in Which can easily be fixed with
line 2670 Tkinter.py Should I create a patch or have I missed something? Thanks. |
gpolo's patch issue3774_2.diff does seem to fix this bug, but it's not in |
I think gpolo's patch can go.
I want to cancel this opinion. I saw no self._tclCommands check before |
Definitely not. The release is about to be produced today. |
Sorry to drag this up again, but if no-one has any complaints it would be |
Fixed in r67082(trunk), r67083(release26-maint), r67084(release25-maint). |
Could you port this to 3.0, please? |
Done. Fixed in r67095(py3k). |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: