This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author alburt
Recipients
Date 2001-03-31.11:59:45
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
To test tkinter in my newly installed Python 2.0, I
tried Demos/tkinter/guido/soliatire.py. This bombed
with the following message:
Traceback (most recent call last):
  File "solitaire.py", line 637, in ?
    main()
  File "solitaire.py", line 632, in main
    game = Solitaire(root)
  File "solitaire.py", line 570, in __init__
    self.deck.fill()
  File "solitaire.py", line 412, in fill
    self.add(Card(suit, value, self.game.canvas))
  File "solitaire.py", line 295, in add
    card.tkraise()
  File "solitaire.py", line 200, in tkraise
    self.group.tkraise()
  File
"/home/burt/lib/python/lib/python2.0/lib-tk/Canvas.py",
line 177, in tkraise
    self._do('tag_raise', aboveThis)
  File
"/home/burt/lib/python/lib/python2.0/lib-tk/Canvas.py",
line 131, in _do
    return self.canvas._do(cmd, (self.tag,) +
_flatten(args))
  File
"/home/burt/lib/python/lib/python2.0/lib-tk/Tkinter.py",
line 1771, in _do
    return self.tk.call((self._w, name) + args)
TclError: bad option "tag_raise": must be addtag, bbox,
bind, canvasx, canvasy, cget, configure, coords,
create, dchars, delete, dtag, find, focus, gettags,
icursor, index, insert, itemcget, itemconfigure, lower,
move, postscript, raise, scale, scan, select, type,
xview, or yview

I managed to fix this with the following kludge to
Canvas.py:

*** Canvas.py	2001/03/31 10:55:24	1.1
--- Canvas.py	2001/03/31 11:38:12
***************
*** 170,180 ****
  	def config(self, cnf={}, **kw):
  		return self.canvas.itemconfigure(self.tag,
_cnfmerge((cnf,kw)))
  	def lower(self, belowThis=None):
! 		self._do('tag_lower', belowThis)
  	def move(self, xAmount, yAmount):
  		self._do('move', xAmount, yAmount)
  	def tkraise(self, aboveThis=None):
! 		self._do('tag_raise', aboveThis)
  	lift = tkraise
  	def scale(self, xOrigin, yOrigin, xScale, yScale):
  		self._do('scale', xOrigin, yOrigin, xScale, yScale)
--- 170,180 ----
  	def config(self, cnf={}, **kw):
  		return self.canvas.itemconfigure(self.tag,
_cnfmerge((cnf,kw)))
  	def lower(self, belowThis=None):
! 		self._do('lower', belowThis)
  	def move(self, xAmount, yAmount):
  		self._do('move', xAmount, yAmount)
  	def tkraise(self, aboveThis=None):
! 		self._do('raise', aboveThis)
  	lift = tkraise
  	def scale(self, xOrigin, yOrigin, xScale, yScale):
  		self._do('scale', xOrigin, yOrigin, xScale, yScale


--- Alastair
History
Date User Action Args
2007-08-23 13:53:46adminlinkissue412682 messages
2007-08-23 13:53:46admincreate