[Python-checkins] CVS: python/dist/src/Lib/lib-tk Tkinter.py,1.147,1.148
Martin v. Löwis
python-dev@python.org
Fri, 8 Sep 2000 09:28:33 -0700
Update of /cvsroot/python/python/dist/src/Lib/lib-tk
In directory slayer.i.sourceforge.net:/tmp/cvs-serv15823
Modified Files:
Tkinter.py
Log Message:
Fix for bug 110629: Generate unique image names by introducing a counter
Index: Tkinter.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/lib-tk/Tkinter.py,v
retrieving revision 1.147
retrieving revision 1.148
diff -C2 -r1.147 -r1.148
*** Tkinter.py 2000/09/07 15:05:09 1.147
--- Tkinter.py 2000/09/08 16:28:30 1.148
***************
*** 2911,2914 ****
--- 2911,2915 ----
class Image:
"""Base class for images."""
+ _last_id = 0
def __init__(self, imgtype, name=None, cnf={}, master=None, **kw):
self.name = None
***************
*** 2919,2923 ****
self.tk = master.tk
if not name:
! name = `id(self)`
# The following is needed for systems where id(x)
# can return a negative number, such as Linux/m68k:
--- 2920,2925 ----
self.tk = master.tk
if not name:
! Image._last_id += 1
! name = "pyimage" +`Image._last_id` # tk itself would use image<x>
# The following is needed for systems where id(x)
# can return a negative number, such as Linux/m68k: