python tkinter: text widget method edit_modified does not work

Bug #84720 reported by rpkrawczyk
2
Affects Status Importance Assigned to Milestone
Python
Fix Released
Unknown
python2.4 (Ubuntu)
Fix Released
Low
Unassigned
python2.5 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: python2.4

When tkinter and a text widget the method edit_modified does not work correctly. As I tried to read the status of the text widget (if it is modified or not), it gave the following error:

Traceback (most recent call last):
  File "lib-tk/Tkinter.py", line 1348, in __call__
    return self.func(*args)
  File "Tools/edit_dblist.py", line 28, in DropDownCmd
    b=self.edit.edit_modified()
  File "lib-tk/Tkinter.py", line 2861, in edit_modified
    return self.edit("modified", arg)
  File "lib-tk/Tkinter.py", line 2849, in edit
    return self._getints(
  File "lib-tk/Tkinter.py", line 975, in _getints
    return tuple(map(getint, self.tk.splitlist(string)))
TypeError: coercing to Unicode: need string or buffer, bool found

This seems to be related to the bug described in https://sourceforge.net/tracker/?func=detail&atid=105470&aid=961805&group_id=5470

Tags: upstream
Revision history for this message
rpkrawczyk (rpkrawczyk) wrote :

As a workaround you can get the status by calling:

print root.tk.call('eval','%s edit modified'%self.textwidget)

where self.textwidget is the variable where the text widget was assigned to.

Matthias Klose (doko)
Changed in python2.4:
importance: Undecided → Low
status: Unconfirmed → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python2.5 - 2.5.2-0ubuntu3

---------------
python2.5 (2.5.2-0ubuntu3) hardy; urgency=low

  * Fix issue 961805, Tk Text.edit_modified() fails. LP: #84720.

 -- Matthias Klose <email address hidden> Tue, 26 Feb 2008 12:27:11 +0100

Changed in python2.5:
status: New → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python2.4 - 2.4.4-7ubuntu3

---------------
python2.4 (2.4.4-7ubuntu3) hardy; urgency=low

  * SVN update up to 2008-02-26.
    - Fix issue #1336, a race condition in subprocess.Popen.
  * Move site customization into sitecustomize.py, don't make site.py
    a config file. Addresses: #309719, #413172, #457361.
  * Move site.py to python2.4-minimal, remove `addbuilddir' from site.py,
    which is unnecessary for installed builds.
  * python2.4-dev: Recommend libc-dev instead of suggesting it. LP: #164909.
  * Fix issue 961805, Tk Text.edit_modified() fails. LP: #84720.

 -- Matthias Klose <email address hidden> Tue, 26 Feb 2008 14:58:24 +0100

Changed in python2.4:
status: Confirmed → Fix Released
Changed in python:
status: Unknown → New
Changed in python:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.