[Patches] [ python-Patches-581396 ] Canvas "select_item" always returns None

noreply@sourceforge.net noreply@sourceforge.net
Mon, 22 Jul 2002 19:56:14 -0700


Patches item #581396, was opened at 2002-07-14 15:23
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=581396&group_id=5470

Category: Tkinter
Group: Python 2.3
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Matthias Klose (doko)
>Assigned to: Neal Norwitz (nnorwitz)
>Summary: Canvas "select_item" always returns None

Initial Comment:
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.""" 
 


----------------------------------------------------------------------

>Comment By: Neal Norwitz (nnorwitz)
Date: 2002-07-22 22:56

Message:
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

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=581396&group_id=5470