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.

classification
Title: Canvas "select_item" always returns None
Type: Stage:
Components: Tkinter Versions: Python 2.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: nnorwitz Nosy List: doko, nnorwitz
Priority: normal Keywords: patch

Created on 2002-07-14 19:23 by doko, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Messages (2)
msg40589 - (view) Author: Matthias Klose (doko) * (Python committer) Date: 2002-07-14 19:23
bug in 2.1.3, 2.2.1 and CVS HEAD. One liner patch:

*** /usr/lib/python2.1/lib-tk/Tkinter.py.orig   Wed Jul
 3 17:04:28 2002 
--- /usr/lib/python2.1/lib-tk/Tkinter.py        Wed Jul
 3 17:04:31 2002 
*************** 
*** 2096,2100 **** 
      def select_item(self): 
          """Return the item which has the selection.""" 
!         self.tk.call(self._w, 'select', 'item') 
      def select_to(self, tagOrId, index): 
          """Set the variable end of a selection in
item TAGORID to INDEX.""" 
--- 2096,2100 ---- 
      def select_item(self): 
          """Return the item which has the selection.""" 
!         return self.tk.call(self._w, 'select', 'item') 
      def select_to(self, tagOrId, index): 
          """Set the variable end of a selection in
item TAGORID to INDEX.""" 
 
msg40590 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2002-07-23 02:56
Logged In: YES 
user_id=33168

Made sure to return None if no item was selected.
Checked in as Tkinter.py 1.160.10.1 & 1.163
History
Date User Action Args
2022-04-10 16:05:30adminsetgithub: 36894
2002-07-14 19:23:44dokocreate