[issue3774] tkinter Menu.delete bug

2008-11-03 Thread Hirokazu Yamamoto
Hirokazu Yamamoto [EMAIL PROTECTED] added the comment: Fixed in r67082(trunk), r67083(release26-maint), r67084(release25-maint). -- keywords: -needs review resolution: - fixed status: open - closed versions: +Python 2.7 ___ Python tracker [EMAIL

[issue3774] tkinter Menu.delete bug

2008-11-03 Thread Dan OD
Dan OD [EMAIL PROTECTED] added the comment: Sorry to drag this up again, but if no-one has any complaints it would be a huge help if gpolo's patch could be checked in. Thanks ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3774

[issue3774] tkinter Menu.delete bug

2008-11-03 Thread Benjamin Peterson
Benjamin Peterson [EMAIL PROTECTED] added the comment: Could you port this to 3.0, please? ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3774 ___ ___

[issue3774] tkinter Menu.delete bug

2008-11-03 Thread Hirokazu Yamamoto
Hirokazu Yamamoto [EMAIL PROTECTED] added the comment: Done. Fixed in r67095(py3k). ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3774 ___ ___ Python-bugs-list

[issue3774] tkinter Menu.delete bug

2008-10-01 Thread Hirokazu Yamamoto
Hirokazu Yamamoto [EMAIL PROTECTED] added the comment: I think gpolo's patch can go. I'm not sure (self._tclCommands is not None) check is not really needed. I want to cancel this opinion. I saw no self._tclCommands check before any other deletecommand() call, I beleive this is OK.

[issue3774] tkinter Menu.delete bug

2008-10-01 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: gpolo's patch issue3774_2.diff does seem to fix this bug, but it's not in the SVN trunk - could this be done before 2.6 final? Definitely not. The release is about to be produced today. ___ Python

[issue3774] tkinter Menu.delete bug

2008-09-16 Thread Dan OD
Dan OD [EMAIL PROTECTED] added the comment: It may be because I'm calling delete incorrectly (I don't think so - see below) but I'm getting an error File C:\CCPN\ccpn\python\memops\gui\Menu.py, line 127, in deleteMenuItems self.delete(0, Tkinter.END) File

[issue3774] tkinter Menu.delete bug

2008-09-12 Thread Dan OD
Dan OD [EMAIL PROTECTED] added the comment: 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

[issue3774] tkinter Menu.delete bug

2008-09-12 Thread Hirokazu Yamamoto
Hirokazu Yamamoto [EMAIL PROTECTED] added the comment: for i in range(self.index(index1), self.index(index2)+1): Probably your working copy is bit old. Please try latest file. This issue was fixed in r65971. :-) # I've added nosy list from issue1342811. -- nosy: +benjamin.peterson,

[issue3774] tkinter Menu.delete bug

2008-09-12 Thread Guilherme Polo
Guilherme Polo [EMAIL PROTECTED] added the comment: Python 2.6b2 was released with this bug, and got fixed later. -- resolution: - out of date status: open - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3774

[issue3774] tkinter Menu.delete bug

2008-09-12 Thread Guilherme Polo
Guilherme Polo [EMAIL PROTECTED] added the comment: I meant beta3, sorry. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3774 ___ ___ Python-bugs-list mailing

[issue3774] tkinter Menu.delete bug

2008-09-12 Thread Guilherme Polo
Guilherme Polo [EMAIL PROTECTED] added the comment: Oops, sorry, I misread the bug report, reopening it (let me go eat something now). -- keywords: -easy, needs review resolution: out of date - status: closed - open ___ Python tracker [EMAIL

[issue3774] tkinter Menu.delete bug

2008-09-12 Thread Guilherme Polo
Changes by Guilherme Polo [EMAIL PROTECTED]: -- keywords: +easy, needs review ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3774 ___ ___

[issue3774] tkinter Menu.delete bug

2008-09-12 Thread Dan OD
Dan OD [EMAIL PROTECTED] added the comment: Thanks guys - I was running an old build. revision 65971 fixed this as Hirokazu mentioned. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3774 ___

[issue3774] tkinter Menu.delete bug

2008-09-12 Thread Guilherme Polo
Guilherme Polo [EMAIL PROTECTED] added the comment: The patch attached is probably the most direct way to fix it, but, can someone remind why we just don't call deletecommand (if there is a command to delete) and let it try to remove the command from _tclCommand then ? (note that this is not

[issue3774] tkinter Menu.delete bug

2008-09-12 Thread Guilherme Polo
Guilherme Polo [EMAIL PROTECTED] added the comment: Again, I meant the previously attached patch (the one by ocean-city) was the most direct way. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3774 ___

[issue3774] tkinter Menu.delete bug

2008-09-12 Thread skomoroh
skomoroh [EMAIL PROTECTED] added the comment: Seems I found the bug. I've attached the patch for current py3k-trunk. Added file: http://bugs.python.org/file11477/menu_fix.patch ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3774

[issue3774] tkinter Menu.delete bug

2008-09-12 Thread Guilherme Polo
Guilherme Polo [EMAIL PROTECTED] added the comment: My patch already does what is proposed in your patch, except yours may possibly not work. It is not guaranteed that self.entrycget(i, 'command') will return an empty string if the command associated to that menu entry is an empty string. Tcl

[issue3774] tkinter Menu.delete bug

2008-09-12 Thread Hirokazu Yamamoto
Hirokazu Yamamoto [EMAIL PROTECTED] added the comment: self.deletecommand doesn't remove menu item, so we don't have to care about index shifting like bellow. +1 for gpolo's patch. a = [0, 1, 2, 3] for i in xrange(len(a)): ... del a[i] ... Traceback (most recent call last): File stdin,

[issue3774] tkinter Menu.delete bug

2008-09-12 Thread Guilherme Polo
Guilherme Polo [EMAIL PROTECTED] added the comment: This needcleanup parameter indicates that the function added to _tclCommands needs to (and will) be removed later. Nevertheless, I believe the proper initialization of _tclCommands should be done elsewhere. And about that docstring.. yes, the

[issue3774] tkinter Menu.delete bug

2008-09-04 Thread Hirokazu Yamamoto
Hirokazu Yamamoto [EMAIL PROTECTED] added the comment: I tried, and I confirmed released python2.5.2 runs fine. and py3k, trunk, release25-maint fails. Probably something changed after 2.5.2 release. -- nosy: +ocean-city versions: +Python 2.5, Python 2.6